There is an arrow button right to the insert link button. When users click this arrow button, the internal links treeview will display. The internal links is a convenient tool for inserting pre-defined hyperlinks. It can be used to display the internal links of the website or frequently used links. You can create a custom links treeview programmatically or by modifying the richtexteditor\config\staticlinks.xml.

How to disable internal links treeview?

If you want to disable the internal links treeview, you can set Editor.DisableStaticLinks Property to true.

<RTE:Editor runat="server" ID="Editor1" DisableStaticLinks="true" />

Add custom links by editing the staticlinks.xml file

The staticlinks.xml file can be found in the richtexteditor/config folder. In staticlinks.xml file you can find the following code which defines the internal links information within RichTextEditor. By default, internal links treeview has the following settings:

      <group text="Websites">
            <group text="CuteSoft">
                  <link text="Cute Chat" href="" />
                  <link text="Cute Live Support" href="" />
                  <link text="Web Messenger" href="" />
                  <link text="Ajax Uploader" href="" />
            <link text="RichTextEditor" href="" />
            <link text="Free Live Chat" href="" />
            <link text="Free Javascript Obfuscator" href="" />

Programmatically add custom links

RichTextEditor provides a few powerful properties that allow you programmatically manage the custom internal links.

Property Description
An array of link groups which will be displayed in internal links treeview as treenode.
An array of predefined hyperlinks which will be displayed in internal links treeview as treeitem.
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",""),
                  new RTEDataItem("AMD","")

            RTEDataGroup group1 = new RTEDataGroup("Portals");
            group1.Items = new RTEDataItem[]{
                  new RTEDataItem("MSN",""),
                  new RTEDataItem("Yahoo","")
            RTEDataGroup group2 = new RTEDataGroup("Shopping");
            group2.Items = new RTEDataItem[]{
                  new RTEDataItem("Amazon",""),
                  new RTEDataItem("Bestbuy","")

            _editor.LinkGroupArray = new RTEDataGroup[] { group1, group2 };

The above code will create the following custom links treeview:

Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.