Skip to content

Commit

Permalink
Prevent CKEditor from initializing an already initialized editor
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati committed Oct 14, 2020
1 parent d8bb4d0 commit 1c02aaa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions concrete/src/Editor/CkeditorEditor.php
Expand Up @@ -161,6 +161,11 @@ function(identifier) {
var element = $(identifier),
form = element.closest('form'),
ckeditor = element.ckeditor({$options}).editor;
CKEDITOR.once('inline', function(e) {
if (element.has(e.data.element.$)) {
return false;
}
});
function resetMode() {
if (ckeditor.mode === 'source' && ckeditor.setMode) {
ckeditor.setMode('wysiwyg');
Expand Down

0 comments on commit 1c02aaa

Please sign in to comment.