I'm using the RichDropDownList to perform custom event. One is to replace the entire content with some html.
So I use the Editor Client Side API to perform a series of action.
Dim oToolsControlImport As CuteEditor.RichDropDownList
oToolsControlImport = CType(oContent.ToolControls("Import").Control, CuteEditor.RichDropDownList)
oToolsControlImport.Attributes("onchange") = "var oEditor = CuteEditor_GetEditor(this); oEditor.ExecCommand('SelectAll'); oEditor.ExecCommand('Delete'); CuteEditor_DropDownCommand(this,'PasteHTML')"
This working perfectly!
Not I wanted to added a Confirmation Box and the problem start.
oToolsControlImport.Attributes("onchange") = "if (!window.confirm('You sure?')) { return; }var oEditor = CuteEditor_GetEditor(this); oEditor.ExecCommand('SelectAll'); oEditor.ExecCommand('Delete'); CuteEditor_DropDownCommand(this,'PasteHTML')"
The MessageBox appear, it also prevent the replace to be done BUT the Dropdown do not repaint correctly. It appear that CuteEditor_DropDownCommand must be called.
My suggestion would be to modify the function to accept NO action CuteEditor_DropDownCommand(this) or a nothing-to-do action CuteEditor_DropDownCommand(this,'null')".
Any Idea how I could deal with this?
By the way, I really like the new API for security/culture/toolbar.