Desktop: Fixes #12811: Rich Text Editor: Save note changes after changing formatting (#16308)

This commit is contained in:
Henry Heino authored and GitHub committed 2026-08-27 09:59:41 +01:00
1 parent e6dc8d8222
commit dff722d6d8
2 files changed
+6

No files matched your search

@@ -1558,6 +1558,8 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: Ref<NoteBodyEditorRef>) => {
editor.on(TinyMceEditorEvents.JoplinChange, onChangeHandler);
editor.on(TinyMceEditorEvents.Undo, onChangeHandler);
editor.on(TinyMceEditorEvents.Redo, onChangeHandler);
editor.on(TinyMceEditorEvents.FormatApply, onChangeHandler);
editor.on(TinyMceEditorEvents.FormatRemove, onChangeHandler);
editor.on(TinyMceEditorEvents.ExecCommand, onExecCommand);
editor.on(TinyMceEditorEvents.SetAttrib, onSetAttrib);
editor.on('TableModified', onTableModified);
@@ -1575,6 +1577,8 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: Ref<NoteBodyEditorRef>) => {
editor.off(TinyMceEditorEvents.JoplinChange, onChangeHandler);
editor.off(TinyMceEditorEvents.Undo, onChangeHandler);
editor.off(TinyMceEditorEvents.Redo, onChangeHandler);
editor.off(TinyMceEditorEvents.FormatApply, onChangeHandler);
editor.off(TinyMceEditorEvents.FormatRemove, onChangeHandler);
editor.off(TinyMceEditorEvents.ExecCommand, onExecCommand);
editor.off(TinyMceEditorEvents.SetAttrib, onSetAttrib);
editor.off('TableModified', onTableModified);
@@ -15,6 +15,8 @@ export enum TinyMceEditorEvents {
Redo = 'Redo',
ExecCommand = 'ExecCommand',
SetAttrib = 'SetAttrib',
FormatApply = 'FormatApply',
FormatRemove = 'FormatRemove',
}
export type DispatchDidUpdateCallback = (editor: Editor)=> void;