Re: Editor.toolbar.Add

  •  07-19-2004, 11:22 PM

    Re: Editor.toolbar.Add

    Maligor,

     

    I suggest  you register your own button and use it in the template property. This method is very flexible.

     

    For adding a custom button one needs to follow two steps. 

    Step1:  Register the button to the CuteEditor

     

    .

    <script runat="server">

    void Page_Load(object sender, System.EventArgs e)

    {

            //Integrate with NetSpell

            System.Web.UI.WebControls.Image SpellingImage = new System.Web.UI.WebControls.Image ();

            SpellingImage.ToolTip = "Check Spelling";

            SpellingImage.ImageUrl = "spell/Spelling.gif";

            SpellingImage.CssClass = "button";

           // The custom button ID can be any string identifier and it's used when defining the template

           SpellingImage.ID = "Spell";

           SpellingImage.Attributes.Add("onclick","checkSpellingById('Editor1_editBox')");

           SpellingImage.Attributes.Add("type","btn");

           

           // Register the button here

           Editor1.RegisterCustomButton(SpellingImage);

    }

    </script>


     

    Step2:  Use the custom button in your template property 

     

    <CE:Editor id="Editor1" runat="server" Template="Bold, Italic, Underline, Spell , Indent,Outdent," ></CE:Editor>


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View Complete Thread