Here is the code..
Dim tc As CuteEditor.ToolControl
tc = cuteEditor.ToolControls(1)
If Not tc Is Nothing Then
Dim Image1 As New System.Web.UI.WebControls.Image()
Image1.ToolTip = "Underline"
Image1.ImageUrl = ".."CuteSoft_Client"CuteEditor"Images"under.gif"
Image1.CssClass = "CuteEditorButton"
'SetMouseEvents(Image1)
Image1.Attributes("onmouseover") = "CuteEditor_ButtonCommandOver(this)"
Image1.Attributes("onmouseout") = "CuteEditor_ButtonCommandOut(this)"
Image1.Attributes("onmousedown") = "CuteEditor_ButtonCommandDown(this)"
Image1.Attributes("onmouseup") = "CuteEditor_ButtonCommandUp(this)"
Image1.Attributes("ondragstart") = "CuteEditor_CancelEvent()"
Image1.Attributes("onclick") = "SetUnderline('" + cuteEditor.ClientID + "');"
tc.Control.Controls.AddAt(0, Image1)
Dim Image2 As New System.Web.UI.WebControls.Image
Image2.ToolTip = "Clean MS Word"
Image2.ImageUrl = ".."CuteSoft_Client"CuteEditor"Images"cleanWord.gif"
Image2.CssClass = "CuteEditorButton"
'SetMouseEvents(Image2)
Image2.Attributes("onmouseover") = "CuteEditor_ButtonCommandOver(this)"
Image2.Attributes("onmouseout") = "CuteEditor_ButtonCommandOut(this)"
Image2.Attributes("onmousedown") = "CuteEditor_ButtonCommandDown(this)"
Image2.Attributes("onmouseup") = "CuteEditor_ButtonCommandUp(this)"
Image2.Attributes("ondragstart") = "CuteEditor_CancelEvent()"
Image2.Attributes("onclick") = "cleanWordPaste('" + cuteEditor.ClientID + "');"
tc.Control.Controls.AddAt(1, Image2)
End If
and the aspx page settings for the control...
<CE:EDITOR id="Editor1" runat="server" Height="150px" width="600px"
text='<%# bind("comment") %>'
EnableContextMenu="True"
EncodeHiddenValue="True"
MaxTextLength = "8000"
ContextMenuMode = "Simple"
Focus="False"
EditorWysiwygModeCss="../CSS/CuteEditorTextArea.css"
EditorOnPaste="Default"
ShowHtmlMode="true"
ShowEditMode="true"
ShowCodeViewToolBar="false"
ShowPreviewMode="false"
ShowTagSelector="false"
ShowDecreaseButton="false"
ShowGroupMenuImage="false"
ShowBottomBar="true"
ShowWordCount="true"
TemplateItemList="[Bold,Italic,Paste,InsertOrderedList,InsertUnOrderedList,Undo,Redo,ToFullPage,FromFullPage,NetSpell,cleanWord]"
ResizeStep="150"
BreakElement="P"
UseHttpHandlerCacheImages ="true"
EnableViewState ="false"
UsePhysicalFormattingTags="true"
DisableAutoFormatting="false">
<FrameStyle BackColor="White"
BorderStyle="Solid"
Width="100%"
Height="100%"
CssClass="CuteEditorFrame"
BorderWidth="1px"
BorderColor="#DDDDDD">
</FrameStyle>
</CE:EDITOR>
Should also note that the control is set on the rowdatabound event of a gridview so that there are multiple instances. I am using the latest build available. another thing is How Do I set the order of the buttons.. I have seen this post http://cutesoft.net/forums/post/132.aspx but there is no toolbar control in the editor in version 6,(such as editor.toolbar.add) so how do I accomplish this?
Also Note... as a side issue only (my priority is to get it working in FF) I have had to replace the built in underline functionality with a custom button using the execCommand("Underline") because UsePhysicalFormattingTags="true" does not work with underline, instead of <u>test</u> I get <span style="text-decoration: underline">test </span> which does not print out in my document (I'm sending it to an RTF file)
Oh also... could you please give me help with my other issue... http://cutesoft.net/forums/thread/42219.aspx
Thank you