Skip to content

Commit

Permalink
MDL-76734 editor_tiny: Listen to TinyMCE submit events
Browse files Browse the repository at this point in the history
jQuery submit events do not trigger the native submit event, and
therefore the TinyMCE submit listener is not called. This means that the
tinymce.triggerSave() function is not called, and the editor content is
not saved.

To work around this, if there is a form for the Node that the editor is
attached to, the jQuery submit event is listened to and the save event
called.

Unfortunately it is not possible to use a global jQuery submit listener
added to the document to save all editors on the page.
In some cases, this is too late because the bubbling process means that
a child node consumer may attempt to consume the data before the
delegated handler is called for the document.
  • Loading branch information
andrewnicols committed Dec 21, 2022
1 parent 24c009f commit 744e1db
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/editor/tiny/amd/build/editor.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 744e1db

Please sign in to comment.