Completed
Last Updated: 09 Jun 2016 11:08 by ADMIN
ADMIN
Rumen
Created on: 19 Dec 2012 08:15
Category: Editor
Type: Feature Request
1
Provide ability to dynamically create RadRibbonbar in RadEditor
Telerik should provide the ability to dynamically create and edit the RadRibbonBar toolbar of RadEditor. Right now it is possible to create and edit the toolbar via the provided XML file.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
3 comments
ADMIN
Ianko
Posted on: 09 Jun 2016 11:08
Here you are also a new article addressing the same topic: http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/toolbars/using-ribbonbar
ADMIN
Rumen
Posted on: 07 Jun 2016 11:50
The way to add tools into tabs and groups is similar to the plain approach to add tools programmatically—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/toolbars/buttons/add-standard-buttons#setting-tools-programmatically-in-the-code-behind. The difference is that you should make sure to use the EditorToolGroup instance's Tab and tag properties to define the tab and the group. 

Here you are an example for that: 

ASPX
<telerik:RadEditor runat="server" ID="RadEditor1" ToolbarMode="RibbonBar">
</telerik:RadEditor>


Codebehind
protected void Page_Load(object sender, System.EventArgs e)
{
    //===== Add new section group in Home tab =====
    EditorToolGroup myGroup = new EditorToolGroup();
    myGroup.Tab = "Home";
    // Define teh place of the new toolgroup via the Tab property.
    myGroup.Tag = "My Section";
    // And the group by using the Tag property.
 
    EditorTool bold = new EditorTool();
    bold.Name = "Bold";
    bold.ShortCut = "CTRL+B";
    myGroup.Tools.Add(bold);
 
    // Add a custom toolstrip
    EditorToolStrip toolStrip = new EditorToolStrip("myStrip");
    toolStrip.Tools.Add(new EditorTool("Bold"));
    toolStrip.Tools.Add(new EditorTool("Italic"));
    toolStrip.Tools.Add(new EditorTool("Underline"));
    myGroup.Tools.Add(toolStrip);
 
 
    RadEditor1.Tools.Add(myGroup);
    //===== End =====
 
    //===== Add new Tab in the toolbar =====
    EditorToolGroup mySecondGroup = new EditorToolGroup();
    // The new tab is declared by using the Tab property
    mySecondGroup.Tab = "New Tab";
    mySecondGroup.Tag = "My Section in Tab";
 
    EditorTool italic = new EditorTool();
    italic.Name = "Italic";
    italic.ShortCut = "CTRL+I";
    mySecondGroup.Tools.Add(italic);
 
    RadEditor1.Tools.Add(mySecondGroup);
    //===== End =====
}
Richard
Posted on: 19 Dec 2012 08:42
This is essential to bring the RadRibbonBar on RadEditor up to the flexibility and implementation of the standard toolbar mode.