--- /tmp/dsg/dolibarr/htdocs/theme/md/ckeditor/github_19.0.3_config.js +++ /tmp/dsg/dolibarr/htdocs/theme/md/ckeditor/client_config.js @@ -12,3 +11,0 @@ - //config.forceSimpleAmpersand = true; // When you put a into the textarea, and go into "source", then ckeditor change the & into &. We don't want this. But this option does not fix this. - //config.entities = false; // When you put a into the textarea, and go into "source", then ckeditor change the & into &. We don't want this. But this option does not fix this. - //config.entities_greek = false; @@ -20 +17 @@ - config.removePlugins = 'elementspath,save'; // this list is modified into DolEditor::Create() + config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font'; @@ -49,2 +46,2 @@ - ['Link','Unlink'], - ['Image','Table','HorizontalRule','Smiley','SpecialChar'], + ['Link','Unlink','Anchor'], + ['Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'], @@ -64 +61 @@ - ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'], + ['Bold','Italic','Underline','Strike','Superscript','-','TextColor','RemoveFormat'], @@ -67 +64 @@ - ['Link','Unlink','Image','Table','HorizontalRule','SpecialChar'], + ['Link','Unlink','Anchor','Image','Table','HorizontalRule','SpecialChar'], @@ -78 +75 @@ - ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'], + ['Bold','Italic','Underline','Strike','Superscript','-','TextColor','RemoveFormat'], @@ -103,3 +100 @@ - ['Image'], - ['Source'], - ['SpecialChar'] + ['Source'] @@ -108,21 +102,0 @@ - - -/* Code to make links into CKEditor, in readonly, mode clickable */ -CKEDITOR.on('instanceReady', function(event) { - var editor = event.editor; - if (editor.readOnly) { - var editable = editor.editable(); - editable.attachListener(editable, 'click', function(evt) { - console.log("We click on a link in CKEditor in readonly mode"); - var target = evt.data.getTarget(); - var anchor = target.getAscendant('a', true); - if (anchor) { - var href = anchor.getAttribute('href'); - if (href) { - window.open(href, '_blank'); // Open link in a new tab/window - } - } - }); - } -}); -