X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/0d9b5a9d90bc4dd9bcb0e081877d8502ae87262e..refs/pull/3630/head:/resources/js/wysiwyg/plugin-codeeditor.js diff --git a/resources/js/wysiwyg/plugin-codeeditor.js b/resources/js/wysiwyg/plugin-codeeditor.js index 4123fb783..82052a40d 100644 --- a/resources/js/wysiwyg/plugin-codeeditor.js +++ b/resources/js/wysiwyg/plugin-codeeditor.js @@ -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(() => { @@ -166,7 +165,6 @@ function register(editor, url) { showPopup(editor, textContent, '', (newCode, newLang) => { const pre = doc.createElement('pre'); const code = doc.createElement('code'); - console.log(newCode); code.classList.add(`language-${newLang}`); code.innerText = newCode; pre.append(code); @@ -186,7 +184,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', });