Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: do not call mceReplaceImage cmd on publish monograph

thecodrr04e79d61a6f0
diff --git a/apps/web/src/components/editor/tinymce.js b/apps/web/src/components/editor/tinymce.js
index 56224e5b6..a82f9c7c3 100644
--- a/apps/web/src/components/editor/tinymce.js
+++ b/apps/web/src/components/editor/tinymce.js
@@ -164,7 +164,8 @@ function TinyMCE(props) {
const mediaAttachmentDownloadedEvent = EV.subscribe(
EVENTS.mediaAttachmentDownloaded,
(image) => {
- const { hash, src } = image;
+ const { groupId, hash, src } = image;
+ if (groupId?.startsWith("monograph")) return;
tinymceRef.current.editor.execCommand("mceReplaceImage", { hash, src });
}
);