Skip to content

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

fix: do not save on editor focus lose

thecodrr9e231af6856e
diff --git a/apps/web/src/components/editor/tinymce.js b/apps/web/src/components/editor/tinymce.js
index 8fc12acf5..ed7d784fe 100644
--- a/apps/web/src/components/editor/tinymce.js
+++ b/apps/web/src/components/editor/tinymce.js
@@ -124,7 +124,14 @@ const plugins = {
pro: "textpattern picker",
};
-const changeEvents = "change input compositionend paste";
+/**
+ * 1. input - called on every change
+ * 2. compositionend - (Android only) called on change
+ * 3. paste - called after content is pasted
+ * We do not include the "change" event here as it is only
+ * invoked after the editor loses focus.
+ */
+const changeEvents = "input compositionend paste";
function TinyMCE(props) {
const {
@@ -236,7 +243,6 @@ function TinyMCE(props) {
}
const onEditorChange = debounce((e) => {
- console.log("onEditorChange", e);
if (!editor.getHTML) return;
editor.getHTML().then((html) => {
onChange(html, editor);