diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 9256e08318cc62c3e0e24053b51c87ab9e132b48..d79999ccdcbc33d1fbac10449a214a8b9d3cc36a 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -169,7 +169,8 @@ class DolEditor //$skin='office2003'; //$skin='v2'; $skin='kama'; - + if (constant('JS_CKEDITOR')) $skin='moono'; // To use external ckeditor 4 js lib + if ($this->toolbarname=='dolibarr_mailings') {$htmlencode_force='true';} else {$htmlencode_force='false';} diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index f51cf7b6bd37c09e4f0d0d6734c07660ce94c9f2..6427cf25fd52b8621a0c13fce73c59ef40572176 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1051,14 +1051,19 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs { print '<!-- Includes JS for CKEditor -->'."\n"; $pathckeditor=DOL_URL_ROOT.'/includes/ckeditor/'; - if (constant('JS_CKEDITOR')) $pathckeditor=JS_CKEDITOR; // To use external ckeditor js lib + $jsckeditor='ckeditor_basic.js'; + if (constant('JS_CKEDITOR')) // To use external ckeditor 4 js lib + { + $pathckeditor=constant('JS_CKEDITOR'); + $jsckeditor='ckeditor.js'; + } print '<script type="text/javascript">'; print 'var CKEDITOR_BASEPATH = \''.$pathckeditor.'\';'."\n"; print 'var ckeditorConfig = \''.dol_buildpath('/theme/'.$conf->theme.'/ckeditor/config.js',1).'\';'."\n"; print 'var ckeditorFilebrowserBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n"; print 'var ckeditorFilebrowserImageBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Type=Image&Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n"; print '</script>'."\n"; - print '<script type="text/javascript" src="'.$pathckeditor.'ckeditor_basic.js"></script>'."\n"; + print '<script type="text/javascript" src="'.$pathckeditor.$jsckeditor.'"></script>'."\n"; } // jQuery Timepicker if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))