--- /tmp/dsg/dolibarr/htdocs/theme/eldy/ckeditor/github_19.0.3_config.js +++ /tmp/dsg/dolibarr/htdocs/theme/eldy/ckeditor/client_config.js @@ -14 +13,0 @@ - //config.entities_greek = false; @@ -20 +19 @@ - config.removePlugins = 'elementspath,save'; // this list is modified into DolEditor::Create() + config.removePlugins = 'elementspath,save'; // config.removePlugins = 'elementspath,save,font'; @@ -49,2 +48,2 @@ - ['Link','Unlink'], - ['Image','Table','HorizontalRule','Smiley','SpecialChar'], + ['Link','Unlink','Anchor'], + ['Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'], @@ -64 +63 @@ - ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'], + ['Bold','Italic','Underline','Strike','Superscript','-','TextColor','RemoveFormat'], @@ -67 +66 @@ - ['Link','Unlink','Image','Table','HorizontalRule','SpecialChar'], + ['Link','Unlink','Anchor','Image','Table','HorizontalRule','SpecialChar'], @@ -77,2 +76,2 @@ - ['Font','FontSize'], - ['Bold','Italic','Underline','Strike','-','TextColor','RemoveFormat'], + ['Format','Font','FontSize'], + ['Bold','Italic','Underline','Strike','Superscript','-','TextColor','RemoveFormat'], @@ -103 +101,0 @@ - ['Image'], @@ -105 +102,0 @@ - ['SpecialChar'], @@ -108,20 +104,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 - } - } - }); - } -});