mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-10 05:06:56 +08:00
Made a bunch of tinymce 6 upgrade fixes
- Added workaround for new 'srcdoc' usage that's breaking content in Firefox, added new 'custom-changes.md' file to document for future. - Updated old usages of 'new' when creating nodes. - Tested and changed logic, where required, where 'editor.dom.select' has been used to replace the old '$' usages. - Fixed bad boolean value being passed to 'setActive' in task list logic.
This commit is contained in:
@ -110,7 +110,6 @@ function defineCodeBlockCustomElement(editor) {
|
||||
|
||||
const container = this.shadowRoot.querySelector('.CodeMirrorContainer');
|
||||
const renderCodeMirror = (Code) => {
|
||||
console.log({content});
|
||||
this.cm = Code.wysiwygView(container, content, this.getLanguage());
|
||||
Code.updateLayout(this.cm);
|
||||
setTimeout(() => {
|
||||
@ -186,7 +185,7 @@ function register(editor, url) {
|
||||
editor.on('PreInit', () => {
|
||||
editor.parser.addNodeFilter('pre', function(elms) {
|
||||
for (const el of elms) {
|
||||
const wrapper = new tinymce.html.Node.create('code-block', {
|
||||
const wrapper = tinymce.html.Node.create('code-block', {
|
||||
contenteditable: 'false',
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user