mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-14 12:42:24 +00:00
Improved WYSIWYG code block behaviour via range of fixes
- Fixed issues with new code blocks breaking or acting odd due to misnamed contenteditable attribute. - Helped fix issue where code blocks may show in a strage blank state due to timing within shadow dom loading. - Fixed some function timing issues where some functions required their async predecessor to have finished. Tested rather heavily in firefox and brave. Fixes #3292
This commit is contained in:
parent
06f694bad2
commit
0de4d6d223
2 changed files with 27 additions and 11 deletions
resources/js/components
|
@ -59,12 +59,10 @@ class CodeEditor {
|
|||
this.languageInput.value = language;
|
||||
this.callback = callback;
|
||||
|
||||
this.show();
|
||||
this.updateEditorMode(language);
|
||||
|
||||
window.importVersioned('code').then(Code => {
|
||||
Code.setContent(this.editor, code);
|
||||
});
|
||||
this.show()
|
||||
.then(() => this.updateEditorMode(language))
|
||||
.then(() => window.importVersioned('code'))
|
||||
.then(Code => Code.setContent(this.editor, code));
|
||||
}
|
||||
|
||||
async show() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue