Hi to all!
First of all tx for your GREAT work on this beautifull web editor!
I'm a new fckeditor italian's user, and i have integrated it with PHP on one of my websites...
My question is: how can i customize the toolbar?
I'v tried with syntax like this, but nothing happens:
$oFCKeditor->ContextMenu = array('Generic','Link','Anchor','Image','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form') ;
Sorry for my english and tx in advance!
First of all tx for your GREAT work on this beautifull web editor!
I'm a new fckeditor italian's user, and i have integrated it with PHP on one of my websites...
My question is: how can i customize the toolbar?
I'v tried with syntax like this, but nothing happens:
$oFCKeditor->ContextMenu = array('Generic','Link','Anchor','Image','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form') ;
Sorry for my english and tx in advance!
RE: $oFCKeditor->ContextMenu ??
Define the available buttons on the toolbar:
FCKConfig.ToolbarSets["PluginTest"] = [
['groups','pageItems','hrtag'],'/',
['Source','DocProps','-','Save','NewPage','Preview'],
['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','Table','Rule','Smiley','SpecialChar','UniversalKey'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['About']
] ;
and then when you want to use it:
$ofckEditor.toolBarSet = 'PluginTest';
I;m pretty sure the ['s are required, but YRMV.
RE: $oFCKeditor->ContextMenu ??
Are you sure you can mix JS/PHP code?
I'm trying your solution, but it doesn't work!
I use a PHP's config file like below, and i think i can configure custom toolbar from inside php, without any javascript row of code, but i need to know whats the correct php's syntax!
RE: $oFCKeditor->ContextMenu ??
Yes, you can mix js php code, but to do toolbars (at least the way I've been doing them) I usually make this file:
//BEGIN customConfig.php
customConfig.php
FCKConfig.ToolbarSets["PluginTest"] = [
['groups','pageItems','hrtag'],'/',
['Source','DocProps','-','Save','NewPage','Preview'],
['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','Table','Rule','Smiley','SpecialChar','UniversalKey'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['About']
] ;
FCKConfig.Plugins.Add( 'phpSQL', 'en,it' ) ;
FCKConfig.Plugins.Add( 'DenTool', 'en,it' ) ;
FCKConfig.Plugins.Add( 'hrtag', 'en,it' ) ;
//END customConfig.php
Put your dynamic code in the customConfig.php and then call it like so:
//BEGIN fckedit.php
$sBasePath = '/FCKeditor/';
$oFCKeditor = new FCKeditor('textEditor') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Config["LinkBrowser"] = true ;
$oFCKeditor->Config["ImageBrowser"] = true ;
//$oFCKeditor->Config["LinkBrowserURL"] = $sBasePath . 'editor/filemanager/browser/default/browser.html?Connector=connectors/php/connector.php' ;
//$oFCKeditor->Config["ImageBrowserURL"] = $sBasePath . 'editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
$oFCKeditor->Config["LinkBrowserURL"] = $sBasePath . 'editor/filemanager/browser/fbxp/browser.html?Connector=connectors/php/connector.php' ;
$oFCKeditor->Config["ImageBrowserURL"] = $sBasePath . 'editor/filemanager/browser/fbxp/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
$oFCKeditor->Config["SkinPath"] = $sBasePath . 'editor/skins/office2003/' ;
$oFCKeditor->Config["CustomConfigurationsPath"] = '/FCKeditor/customConfig.cfm';
$oFCKeditor->Config["FontNames"] = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana;' ;
$oFCKeditor->ToolbarSet = 'PluginTest';
$oFCKeditor->Value = $columns['pageText'];
$oFCKeditor->Create() ;
?>
//End fckedit.php
RE: $oFCKeditor->ContextMenu ??
It works perfectly
Tx and sorry! My mistake