From d04566477151db6bf3a3f6ee4362214235ce9108 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Wed, 8 Mar 2023 03:57:42 +0200 Subject: [PATCH] fix ketida filemanager --- wax-prosemirror-core/src/config/plugins/defaultPlugins.js | 2 +- wax-prosemirror-services/src/ImageService/components/Upload.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wax-prosemirror-core/src/config/plugins/defaultPlugins.js b/wax-prosemirror-core/src/config/plugins/defaultPlugins.js index eb6227920..7f3e4cca6 100644 --- a/wax-prosemirror-core/src/config/plugins/defaultPlugins.js +++ b/wax-prosemirror-core/src/config/plugins/defaultPlugins.js @@ -3,4 +3,4 @@ import { dropCursor } from 'prosemirror-dropcursor'; import { gapCursor } from 'prosemirror-gapcursor'; import FakeCursorPlugin from './FakeCursorPlugin'; -export default [dropCursor(), gapCursor(), history(), FakeCursorPlugin()]; +export default [dropCursor(), gapCursor(), history()]; diff --git a/wax-prosemirror-services/src/ImageService/components/Upload.js b/wax-prosemirror-services/src/ImageService/components/Upload.js index 4d74a837c..b7eeef03e 100644 --- a/wax-prosemirror-services/src/ImageService/components/Upload.js +++ b/wax-prosemirror-services/src/ImageService/components/Upload.js @@ -1,3 +1,5 @@ +import { v4 as uuidv4 } from 'uuid'; + const findPlaceholder = (state, id, placeholderPlugin) => { const decos = placeholderPlugin.getState(state); const found = decos.find(null, null, spec => spec.id === id); @@ -30,6 +32,7 @@ const insertImage = (urls, view, placeholderPlugin) => { pos, pos, view.state.schema.nodes.image.create({ + id: uuidv4(), src: urls[i].source, fileid: urls[i].id, }), -- GitLab