Hi miller399,
Please refer to http://richtexteditor.com/document/scr/html/custom-links-dropdown.htm, it shows you how to custom the links Programmatically.
Programmatically add custom links
RichTextEditor provides a few powerful properties that allow you programmatically manage the custom internal links.
Property | Description |
---|
Editor.LinkGroupArray
| An array of link groups which will be displayed in internal links treeview as treenode. |
Editor.LinkItemArray
| An array of predefined hyperlinks which will be displayed in internal links treeview as treeitem. |
Editor.LinkUrlArray
| An array of xml files. Those xml files should contain predefined set of hyperlinks which will be displayed in the internal links treeview. editor.LinkUrlArray = new string[] { "mylinks.xml"}; |
Code Example:
_editor.LinkUrlArray = new string[] { "mylinks.xml"};
_editor.DisableStaticLinks = true;
_editor.LinkItemArray = new RTEDataItem[]{
new RTEDataItem("Intel","http://www.intel.com/"),
new RTEDataItem("AMD","http://www.amd.com/")
};
RTEDataGroup group1 = new RTEDataGroup("Portals");
group1.Items = new RTEDataItem[]{
new RTEDataItem("MSN","http://www.msn.com/"),
new RTEDataItem("Yahoo","http://www.yahoo.com/")
};
RTEDataGroup group2 = new RTEDataGroup("Shopping");
group2.Items = new RTEDataItem[]{
new RTEDataItem("Amazon","http://www.amazon.com/"),
new RTEDataItem("Bestbuy","http://www.bestbuy.com/")
};
_editor.LinkGroupArray = new RTEDataGroup[] { group1, group2 };
The above code will create the following custom links treeview:
Regards,
Ken