aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-09-09 18:16:12 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-09-09 18:16:12 -0400
commit82b0b08979f63b88b93bf1419cde659cb262e2a3 (patch)
treed2c26e6912cee66fd11db67f81d38ed4dd657367 /src
parentaf34c087bf3226c09a657959cc14fc4ae291feb0 (diff)
need toDOM for images or you cant paste them
Diffstat (limited to 'src')
-rw-r--r--src/client/util/RichTextSchema.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 05a37759f..e71031a87 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -144,6 +144,11 @@ export const nodes: { [index: string]: NodeSpec } = {
};
}
}],
+ // TODO if we don't define toDom, dragging the image crashes. Why?
+ toDOM(node) {
+ const attrs = { style: `width: ${node.attrs.width}` };
+ return ["img", { ...node.attrs, ...attrs }];
+ }
},
video: {