Skip to content

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

fix: invoke function instead of command for progress updates

thecodrrf4370686cb62
diff --git a/apps/web/src/components/editor/tinymce.js b/apps/web/src/components/editor/tinymce.js
index be798a37b..0e96f429f 100644
--- a/apps/web/src/components/editor/tinymce.js
+++ b/apps/web/src/components/editor/tinymce.js
@@ -154,10 +154,8 @@ function TinyMCE(props) {
const event = AppEventManager.subscribe(
AppEvents.UPDATE_ATTACHMENT_PROGRESS,
(progressState) => {
- tinymceRef.current.editor.execCommand(
- "mceUpdateAttachmentProgress",
- progressState
- );
+ if (!tinymceRef.current.editor._updateAttachmentProgress) return;
+ tinymceRef.current.editor._updateAttachmentProgress(progressState);
}
);
@@ -180,6 +178,7 @@ function TinyMCE(props) {
onFocus={onFocus}
onInit={(args, editor) => {
editor.serializer.addTempAttr("data-progress");
+ clearTimeout(editor.changeTimeout);
onInit(args, editor);
}}
initialValue={initialValue}
@@ -237,8 +236,8 @@ function TinyMCE(props) {
span: "--progress",
},
extended_valid_elements: `img[*|src=placeholder.svg]`,
- attachmenthandler_download_attachment: (hash) => {
- console.log(hash);
+ attachmenthandler_download_attachment: async (hash) => {
+ console.error("Not implemented.");
},
}}
onBeforeExecCommand={async (command) => {