Hi,
I create a custom button and it doesn`t work fine.
Here's my code:
protected void Page_Load(object sender, EventArgs e)
{
Editor1.ThemeType =
ThemeType.Office2007;
AddButton();
}
protected void AddButton()
{
WebControl ctrl=Editor1.CreateCommandButton("Titulo","text.gif","titulo");
ctrl.Attributes[
"onclick"]="CuteEditor_GetEditor(this).ExecCommand('PasteHTML',false,'<h1></h1>')";
//register the custom button Editor1.RegisterCustomButton("mybutton",ctrl);
Editor1.RegisterCustomButton(
"titulo",ctrl);
}
************************************************************
<
CE:Editor ID="Editor1" runat="server" ConfigurationPath="~/HTMLEditor/toolbars/toolbarstandard1.config" TemplateItemList="[Bold,Italic,Underline,InsertOrderedList,Subscript,SuperScript]/[titulo]"></CE:Editor>
************************************************************************************
The problem is when I click the button, it writes HTML but the text never have H1 tags. (in normal view)
Can you help me please?
Thanks in advance