Skip to content
Snippets Groups Projects
Commit bba85152 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

update DOM value property, not innerHTML, fixes #2948

Closes #2948

Merge request studip/studip!1984
parent 1b5e7d3a
No related branches found
No related tags found
No related merge requests found
...@@ -213,10 +213,8 @@ function enhanceEditor($textarea, ckeditor) { ...@@ -213,10 +213,8 @@ function enhanceEditor($textarea, ckeditor) {
// make sure HTML marker is always set, in // make sure HTML marker is always set, in
// case contents are cut-off by the backend // case contents are cut-off by the backend
$textarea.closest('form').submit(() => { $textarea.closest('form').submit(() => {
const data = wysiwyg.markAsHtml(ckeditor.getData()); ckeditor.setData(wysiwyg.markAsHtml(ckeditor.getData()));
ckeditor.setData(data);
ckeditor.updateSourceElement(); ckeditor.updateSourceElement();
$textarea.get(0).value = data;
}); });
// focus the editor if requested // focus the editor if requested
...@@ -226,9 +224,7 @@ function enhanceEditor($textarea, ckeditor) { ...@@ -226,9 +224,7 @@ function enhanceEditor($textarea, ckeditor) {
ckeditor.ui.focusTracker.on('change:isFocused', (evt, name, isFocused) => { ckeditor.ui.focusTracker.on('change:isFocused', (evt, name, isFocused) => {
if (!isFocused) { if (!isFocused) {
const data = wysiwyg.markAsHtml(ckeditor.getData()); ckeditor.sourceElement.value = wysiwyg.markAsHtml(ckeditor.getData());
ckeditor.updateSourceElement(data);
$textarea.get(0).value = data;
} }
}); });
......
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