diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index bc1cee119a4..1484a9defd5 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -997,21 +997,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