mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-09 12:36:37 +08: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:
@ -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() {
|
||||
|
Reference in New Issue
Block a user