Here's a copy of the code I meant the link to in my previous post to show. It would be helpful if there was a similar example in your documentation, as below, that showed how to set up a custom button that selects text:
Example:
<?php
$editor=new CuteEditor();
$editor->ID="Editor1";
$editor->Text="Type here..";
$editor->FilesPath="CuteEditor_Files";
$editor->TemplateItemList="G_start,Bold,Italic,Underline,Separator,JustifyLeft,JustifyCenter,JustifyRight,G_end";
$editor->CustomAddons = "<img title=\"Using oncommand\"
class=\"CuteEditorButton\"
onmouseover=\"CuteEditor_ButtonCommandOver(this)\"
onmouseout=\"CuteEditor_ButtonCommandOut(this)\"
onmousedown=\"CuteEditor_ButtonCommandDown(this)\"
onmouseup=\"CuteEditor_ButtonCommandUp(this)\"
ondragstart=\"CuteEditor_CancelEvent()\" Command=\"MyCmd\"
src=\"CuteEditor_Files/Images/contact.gif\" />";
$editor->Draw();
$ClientID=$editor->ClientID();
$editor=null;
//use $_POST["Editor1"]to catch the data
?>
<br />
<input type="submit" value="Submit" ID="Submit1" NAME="Submit1" /><br />
<script language="JavaScript" type="text/javascript" >
var editor1=document.getElementById("<?php echo $ClientID;?>");
function CuteEditor_OnCommand(editor,command,ui,value)
{
//handle the command by yourself
if(command=="MyCmd")
{
// editor.ExecCommand("InsertTable");
editor1.PasteHTML("Hello World");
return true;
}
}
</script>