diff --git a/htdocs/includes/fckeditor/fckconfig.js b/htdocs/includes/fckeditor/fckconfig.js index 251465be90d..ac0a3fab78d 100644 --- a/htdocs/includes/fckeditor/fckconfig.js +++ b/htdocs/includes/fckeditor/fckconfig.js @@ -20,8 +20,6 @@ FCKConfig.CustomConfigurationsPath = '' ; -print FCKConfig.BasePath; - FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; FCKConfig.DocType = '' ; @@ -79,46 +77,35 @@ FCKConfig.FloatingPanelsZIndex = 10000 ; FCKConfig.ToolbarLocation = 'In' ; FCKConfig.ToolbarSets["dolibarr_mailings"] = [ - ['Source','DocProps','-','Save','NewPage','Preview'], - ['Cut','Copy','Paste','PasteText','PasteWord','-','Print'], - ['Undo','Redo','-','Find','Replace','-','About'], - '/', - ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], - ['OrderedList','UnorderedList','-','Outdent','Indent'], - ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], - ['Link','Unlink'], - ['SelectAll','RemoveFormat'], - '/', - ['FontName','FontSize'], - ['Rule','SpecialChar','TextColor','BGColor','FitWindow'] + ['FitWindow','Source'], + ['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'], + ['Undo','Redo','-','Find','Replace','-','SelectAll'], + ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'], + ['OrderedList','UnorderedList','-','Outdent','Indent'], + ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], + ['Link','Unlink','Anchor','Image','Table','Rule','Smiley','SpecialChar','UniversalKey'], + ['FontName','FontSize'] ] ; FCKConfig.ToolbarSets["dolibarr_notes"] = [ - ['Source','DocProps','-','Save','NewPage','Preview'], - ['Cut','Copy','Paste','PasteText','PasteWord','-','Print'], - ['Undo','Redo','-','Find','Replace','-','About'], - '/', - ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], - ['OrderedList','UnorderedList','-','Outdent','Indent'], - ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], - ['Link','Unlink'], - ['SelectAll','RemoveFormat'], - '/', - ['FontName','FontSize'], - ['Rule','SpecialChar','TextColor','BGColor','FitWindow'] + ['FitWindow','Source'], + ['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Preview','Print'], + ['Undo','Redo','-','Find','Replace','-','SelectAll'], + ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'], + ['OrderedList','UnorderedList','-','Outdent','Indent'], + ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], + ['Link','Unlink','Anchor','Image','Table','Rule','SpecialChar','UniversalKey'], + ['FontName','FontSize'] ] ; FCKConfig.ToolbarSets["dolibarr_details"] = [ - ['Source','DocProps','-','Save','NewPage','Preview'], - ['Cut','Copy','Paste','PasteText','PasteWord','-','Print'], - ['Undo','Redo','-','Find','Replace','-','About'], - '/', - ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], - ['OrderedList','UnorderedList','-','Outdent','Indent'], - ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], - ['Link','Unlink'], - ['SelectAll','RemoveFormat'], - '/', - ['FontName','FontSize'], - ['Rule','SpecialChar','TextColor','BGColor','FitWindow'] + ['FitWindow','Source'], + ['Cut','Copy','Paste','-','Preview'], + ['Undo','Redo'], + ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','TextColor','BGColor','-','RemoveFormat'], + ['OrderedList','UnorderedList','-','Outdent','Indent'], + ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], + ['Link','Unlink','Anchor'], + ['SpecialChar','UniversalKey'], + ['FontName','FontSize'] ] ; FCKConfig.ToolbarSets["Default"] = [ diff --git a/htdocs/lib/doleditor.class.php b/htdocs/lib/doleditor.class.php index aca46c2f314..a27004ad017 100644 --- a/htdocs/lib/doleditor.class.php +++ b/htdocs/lib/doleditor.class.php @@ -60,16 +60,22 @@ class DolEditor $this->editor = new FCKeditor($htmlname); $this->editor->Value = $content; $this->editor->Height = $height; + $this->editor->ToolbarSet = $toolbarname; + $this->editor->Config['AutoDetectLanguage'] = 'true'; + $this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In'; + $this->editor->Config['ToolbarStartExpanded'] = $toolbarstartexpanded; if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js')) { $this->editor->Config['CustomConfigurationsPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js'; - $this->editor->ToolbarSet = $toolbarname; - $this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In'; - $this->editor->Config['ToolbarStartExpanded'] = $toolbarstartexpanded; $this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/'; -// if ($langs->origlang=='auto') +// if ($langs->origlang!='auto') +// { +// } + } + else + { +// if ($langs->origlang!='auto') // { - $this->editor->Config['AutoDetectLanguage'] = 'true'; // } } }