Gets or sets the toolbars displayed on top of the editor text box.
Toolbars are automatically created from the XML file specified by the EditorSource property. However, you can use this property to build your own toolbars programmatically at runtime.
This sample shows how to build toolbars at runtime.
using Karamasoft.WebControls.UltimateEditor;
private void Page_Load(object sender, System.EventArgs e)
{
// If you want to create your own toolbar from scratch
// Create a new toolbar list
//ToolbarList tbl = new ToolbarList();
// If you want to modify the original toolbars
// Get the Toolbars property loaded from the XML file
tbl = UltimateEditor1.Toolbars;
// Create a new toolbar
Toolbar tb = new Toolbar();
// Create a new toolbar item
ToolbarItem tbi = new ToolbarItem();
// Set toolbar item properties
tbi.Type = ToolbarItem.ItemType.Button;
tbi.Command = ToolbarItem.CommandType.Italic;
// Add toolbar item to toolbar
tb.Add(tbi);
// Add toolbar to toolbar list
tbl.Add(tb);
// Set toolbars
UltimateEditor1.Toolbars = tbl;
}
UltimateEditor Class | Karamasoft.WebControls.UltimateEditor Namespace