Skip to content
Snippets Groups Projects
Commit d9e96bf9 authored by Marcus Eibrink-Lunzenauer's avatar Marcus Eibrink-Lunzenauer Committed by Jan-Hendrik Willms
Browse files

Prevent MathJax from changing the CKEditor's content.

Closes #2418

Merge request studip/studip!1639
parent 0ec620a8
No related branches found
No related tags found
No related merge requests found
...@@ -118,8 +118,7 @@ function replaceTextarea(textarea) { ...@@ -118,8 +118,7 @@ function replaceTextarea(textarea) {
} }
return STUDIP.loadChunk('wysiwyg') return STUDIP.loadChunk('wysiwyg')
// TODO: Zuerst muss #2481 behoben werden, bevor diese Zeile wieder funktionieren kann. .then(loadMathJax)
// .then(loadMathJax)
.then(createEditor) .then(createEditor)
.then(setEditorInstance) .then(setEditorInstance)
.then(enhanceEditor) .then(enhanceEditor)
...@@ -193,10 +192,15 @@ function replaceTextarea(textarea) { ...@@ -193,10 +192,15 @@ function replaceTextarea(textarea) {
button.withText = false; button.withText = false;
} }
// Tell MathJax v2.7 to leave the editor alone
ckeditor.ui.element.classList.add('tex2jax_ignore');
// TODO: Kein updateSourceElement im SourceEditing-Modus // TODO: Kein updateSourceElement im SourceEditing-Modus
// $(ckeditor.container.$).on('blur', '.CodeMirror', function (event) { // $(ckeditor.container.$).on('blur', '.CodeMirror', function (event) {
// ckeditor.updateElement(); // also update in source mode // ckeditor.updateElement(); // also update in source mode
// }); // });
return ckeditor;
} }
function emitLoadEvent(ckeditor) { function emitLoadEvent(ckeditor) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment