W pliku
fckconfig.js są deklaracje pasków narzędziowyh.
Domyślny jest zadeklarowany tak:
Kod
FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','UniversalKey'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['About']
];
Możesz zrobić swój, na przykład taki:
Kod
FCKConfig.ToolbarSets["Basic"] = [
[ 'Source' ],
[ 'Bold','Italic','Underline', '-', 'OrderedList','UnorderedList', '-', 'Link','Unlink' ],
[ 'JustifyLeft','JustifyCenter','JustifyRight' ],
[ 'Image', 'Flash', '-', 'Table' ],
[ 'TextColor' ],
[ 'SpecialChar' ]
];
Wtedy przy tworzeniu instancji edytora dajesz tak:
Kod
<script type="text/javascript">
<!--
var oFCKeditor = new FCKeditor( 'name', 545, 500 );
oFCKeditor.BasePath = '/path/to/editor/';
oFCKeditor.ToolbarSet = 'Basic'; // Tu podajesz z którego paska korzystasz
oFCKeditor.Value = '';
oFCKeditor.Create();
-->
</script>
P.S.
Przenoszę z
Gotowe skrypty php na
JavaScript