diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 4e1e373782e..6931f421a2e 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1011,21 +1011,15 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
if (! empty($conf->fckeditor->enabled) && (empty($conf->global->FCKEDITOR_EDITORNAME) || $conf->global->FCKEDITOR_EDITORNAME == 'ckeditor'))
{
print ''."\n";
- if (constant('JS_CKEDITOR'))
- {
- print ''."\n";
- print ''."\n";
- }
- else
- {
- print ''."\n";
- print ''."\n";
- }
+ $pathckeditor=DOL_URL_ROOT.'/includes/ckeditor/';
+ if (constant('JS_CKEDITOR')) $pathckeditor=JS_CKEDITOR; // To use external ckeditor js lib
+ print ''."\n";
+ print ''."\n";
}
// Global js function
@@ -1041,7 +1035,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
{
// jsfile is a relative path
print ''."\n";
- }
+ }
// JS forced by page in top_htmlhead (relative url starting with /)
if (is_array($arrayofjs))
{