How to create a custom toolbar configuration file?
How to create a custom toolbar configuration file?
The following table shows the steps to create your own toolbar
configuration file.
|
Step 1: Create a new configuration file
and name it "mytools.config".
Open the configuration file and copy/paste the code below, save it to
CuteEditor_Files/Configuration folder.
<?xml
version="1.0"
encoding="utf-8"
?>
<configuration>
<contextmenu>
<item
name="Editing"
value="False"
/>
<item
name="Format"
value="False"
/>
<item
name="Insert"
value="False"
/>
<item
name="InsertAdvanced"
v alue="False"
/>
<item
name="InsertFiles"
value="False"
/>
<item
name="InsertForms"
value="False"
/>
<item
name="Relative"
value="False"
/>
<item
name="Tags"
value="False"
/>
<item
name="Verbs"
value="False"
/>
</contextmenu>
<toolbars>
<item
type="g_start"
/>
<item
type="image"
name="Save"
postback="True"
/>
<item
type="image"
name="Bold"
/>
<item
type="image"
name="Italic"
/>
<item
type="image"
name="Underline"
imagename="under"
/>
<item
type="separator"
/>
<item
type="image"
name="JustifyLeft"
imagename="left"
/>
<item
type="image"
name="JustifyCenter"
imagename="center"
/>
<item
type="image"
name="JustifyRight"
imagename="right"
/>
<item
type="holder"
name="insertcustombutonhere"
/>
<item
type="g_end"
/>
</toolbars>
</configuration >
|
|
Step 2: Set the editor
In the CE setting,you need to set the use the ConfigurationPath
to specify the path of your custom configuration file.
For example:
Example Code
<?php
$editor=new CuteEditor();
$editor->ID="Editor1";
$editor->Text="Type here";
$editor->FilesPath="CuteEditor_Files";
//specify the path of your custom configuration file
$editor->ConfigurationPath="/CuteEditor_Files/Configuration/myTools.config";
$editor->Draw();
$editor=null;
//use $_POST["Editor1"]to catch the data
?>
|