aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextSchema.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r--src/client/util/RichTextSchema.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index c0e6f7899..3e3e98206 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -97,13 +97,13 @@ export const nodes: { [index: string]: NodeSpec } = {
title: dom.getAttribute("title"),
alt: dom.getAttribute("alt"),
width: Math.min(100, Number(dom.getAttribute("width"))),
- }
+ };
}
}],
// TODO if we don't define toDom, something weird happens: dragging the image will not move it but clone it. Why?
toDOM(node) {
- const attrs = { style: `width: ${node.attrs.width}` }
- return ["img", { ...node.attrs, ...attrs }]
+ const attrs = { style: `width: ${node.attrs.width}` };
+ return ["img", { ...node.attrs, ...attrs }];
}
},
@@ -375,7 +375,7 @@ export class ImageResizeView {
const currentX = e.pageX;
const diffInPx = currentX - startX;
self._outer.style.width = `${startWidth + diffInPx}`;
- }
+ };
const onpointerup = () => {
document.removeEventListener("pointermove", onpointermove);
@@ -384,11 +384,11 @@ export class ImageResizeView {
view.state.tr.setNodeMarkup(getPos(), null,
{ src: node.attrs.src, width: self._outer.style.width })
.setSelection(view.state.selection));
- }
+ };
- document.addEventListener("pointermove", onpointermove)
- document.addEventListener("pointerup", onpointerup)
- }
+ document.addEventListener("pointermove", onpointermove);
+ document.addEventListener("pointerup", onpointerup);
+ };
this._outer.appendChild(this._handle);
this._outer.appendChild(this._img);