Fix: Correction probleme fckeditor si utilisation d'un theme qui ne personalise pas fckeditor
This commit is contained in:
parent
12c8092490
commit
d1e970b5aa
@ -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"] = [
|
||||
|
||||
@ -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';
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user