diff --git a/private/js/cms.tiptap.js b/private/js/cms.tiptap.js index b26dc43..215c8a4 100644 --- a/private/js/cms.tiptap.js +++ b/private/js/cms.tiptap.js @@ -122,7 +122,7 @@ class CMSTipTapPlugin { save_callback: save_callback, settings: settings, }); - el.addEventListener('focusout', ({editor, event}) => { + editor.on('blur', ({editor, event}) => { this._blurEditor(editor, event); }); editor.on('update', ({editor}) => { diff --git a/private/js/tiptap_plugins/cms.styles.js b/private/js/tiptap_plugins/cms.styles.js index e81da2c..44677fd 100644 --- a/private/js/tiptap_plugins/cms.styles.js +++ b/private/js/tiptap_plugins/cms.styles.js @@ -5,16 +5,16 @@ import {Mark, mergeAttributes,} from '@tiptap/core'; +'use strict'; + const _markElement = { addOptions() { - 'use strict'; return { HTMLAttributes: {}, }; }, parseHTML() { - 'use strict'; return [ { tag: this.name.toLowerCase() @@ -22,7 +22,6 @@ const _markElement = { ]; }, renderHTML({ HTMLAttributes }) { - 'use strict'; return [this.name.toLowerCase(), mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]; }, addCommands() {