From 19a6189d57707e181880ef7184f7ed6b30fef6ec Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Wed, 17 Jan 2018 16:59:17 +0200 Subject: [PATCH] Disable edit of images and embeds in Draftail - not cooked enough --- client/src/components/Draftail/blocks/EmbedBlock.js | 6 +----- client/src/components/Draftail/blocks/ImageBlock.js | 6 +----- .../blocks/__snapshots__/EmbedBlock.test.js.snap | 5 ----- .../blocks/__snapshots__/ImageBlock.test.js.snap | 10 ---------- 4 files changed, 2 insertions(+), 25 deletions(-) diff --git a/client/src/components/Draftail/blocks/EmbedBlock.js b/client/src/components/Draftail/blocks/EmbedBlock.js index 4af93c009..4a412cee6 100644 --- a/client/src/components/Draftail/blocks/EmbedBlock.js +++ b/client/src/components/Draftail/blocks/EmbedBlock.js @@ -15,7 +15,7 @@ const propTypes = { * Editor block to display media and edit content. */ const EmbedBlock = props => { - const { entity, onEditEntity, onRemoveEntity } = props.blockProps; + const { entity, onRemoveEntity } = props.blockProps; const { url, title, thumbnail } = entity.getData(); return ( @@ -30,10 +30,6 @@ const EmbedBlock = props => { {title} - - diff --git a/client/src/components/Draftail/blocks/ImageBlock.js b/client/src/components/Draftail/blocks/ImageBlock.js index 022944ab5..e819b2954 100644 --- a/client/src/components/Draftail/blocks/ImageBlock.js +++ b/client/src/components/Draftail/blocks/ImageBlock.js @@ -38,7 +38,7 @@ class ImageBlock extends Component { render() { const { blockProps } = this.props; - const { entity, onEditEntity, onRemoveEntity } = blockProps; + const { entity, onRemoveEntity } = blockProps; const { src, alt } = entity.getData(); return ( @@ -48,10 +48,6 @@ class ImageBlock extends Component { - - diff --git a/client/src/components/Draftail/blocks/__snapshots__/EmbedBlock.test.js.snap b/client/src/components/Draftail/blocks/__snapshots__/EmbedBlock.test.js.snap index 8c2606885..2df6f2de5 100644 --- a/client/src/components/Draftail/blocks/__snapshots__/EmbedBlock.test.js.snap +++ b/client/src/components/Draftail/blocks/__snapshots__/EmbedBlock.test.js.snap @@ -22,11 +22,6 @@ exports[`EmbedBlock renders 1`] = ` > Test title -