The Code Snippet dropdown of CuteEditor by default displays a predefined set of
Code Snippets. You can easily modify this default set using the following
methods.
|
1: Edit Dropdown Configuration file (Common.config). You can modify the Codes element to create your own Code Snippet list. Example:
<item text="Email signature" value="Email signature"></item> <item text="Contact us" value="Contact us"></item>
</Codes> Now the Code Snippet dropdown contains the followings:
|
|
<?php
$editor=new CuteEditor(); $editor->ID="Editor1"; $editor->Text="Type here"; $editor->FilesPath="CuteEditor_Files"; //Programmatically populate the Code Snippet dropdown $editor->CodeSnippetDropDownMenuNames="Email signature, Contact us"; $editor->CodeSnippetDropDownMenuList="Email signature, Contact us"; $editor->Draw(); $editor=null; //use $_POST["Editor1"]to catch the data ?> |