aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextSchema.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-09-06 17:46:02 -0400
committerbob <bcz@cs.brown.edu>2019-09-06 17:46:02 -0400
commitee8f7e6ff149defe919a5ac219ed700a4688b46c (patch)
tree4576cd1d99363ffc71c39ae6ced7c186579a01c0 /src/client/util/RichTextSchema.tsx
parent0d9133bbd8417e68dfd62706369067c1e2e30c97 (diff)
fixed image resizing within text
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r--src/client/util/RichTextSchema.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 8851839a2..153aaa791 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -598,9 +598,9 @@ export class ImageResizeView {
document.removeEventListener("pointermove", onpointermove);
document.removeEventListener("pointerup", onpointerup);
view.dispatch(
- view.state.tr.setNodeMarkup(getPos(), null,
+ view.state.tr.setSelection(view.state.selection).setNodeMarkup(getPos(), null,
{ src: node.attrs.src, width: self._outer.style.width })
- .setSelection(view.state.selection));
+ );
};
document.addEventListener("pointermove", onpointermove);