Monday, March 19, 2012

Custom HTMLEditor C#

using AjaxControlToolkit.HTMLEditor;
/// 
/// Summary description for MyHTMLEditor
/// 
/// namespace 
/// 
namespace TyroDeveloper.WebControls
{
    public class MyHTMLEditor : Editor
    {
        protected override void FillTopToolbar()
        {
           
            //this.TopToolbar.Buttons.Clear();
            TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Bold()); 
            TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Italic());
            TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Underline());
            TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.BulletedList());
        }
        protected override void FillBottomToolbar()
        {
            //base.FillBottomToolbar();
            BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.DesignMode()); 
            BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.PreviewMode());
            BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.HtmlMode()); 
        }
    }
}

Please visit: www.TyroDeveloper.com

Please Click on +1

No comments:

Post a Comment