diff options
-rw-r--r-- | src/client/util/RichTextSchema.tsx | 5 |
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: { |