X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ef3de1050f880d6848e2382c5df13cf48131c02e..HEAD:/resources/js/components/wysiwyg-editor.js diff --git a/resources/js/components/wysiwyg-editor.js b/resources/js/components/wysiwyg-editor.js index 56dbe8d7c..5a2581900 100644 --- a/resources/js/components/wysiwyg-editor.js +++ b/resources/js/components/wysiwyg-editor.js @@ -25,6 +25,7 @@ export class WysiwygEditor extends Component { textDirection: this.$opts.textDirection, translations, }); + window.wysiwyg = this.editor; }); let handlingFormSubmit = false; @@ -38,7 +39,9 @@ export class WysiwygEditor extends Component { handlingFormSubmit = true; this.editor.getContentAsHtml().then(html => { this.input.value = html; - this.input.form.submit(); + setTimeout(() => { + this.input.form.requestSubmit(); + }, 5); }); } else { handlingFormSubmit = false;