Need help to hide all properties button form the dialogue and default target to New Window

2 posts, 0 answers
  1. Abhay
    Abhay avatar
    1 posts
    Member since:
    Sep 2013

    Posted 21 Sep 2013 Link to this post

    HI All,

    I want to hide the All properties button in Insert Link dialogue  and default target to new window in the Insert Link dialogue of radedior.Can you please give me idea how to do this? I can see when I create the is post on the forum I found the Insert Link dialogue doesn't have all properties button.

    How can I do this?

    I have used below code

      <telerik:radeditor runat="server" ID="RadEditor1" >
                 <telerik:EditorTool Name="InsertLink" Text="Insert Special Link" Enabled="true" />

    When I use the custom dialogue it show the command hasn't implemented. e.g

       <telerik:radeditor runat="server" ID="RadEditor1" >
                 <telerik:EditorTool Name="InsertSpecialLink" Text="Insert Special Link" Enabled="true" />

    <style type="text/css">
    .reToolbar.Default .InsertSpecialLink
            background-image: url(;
         <script type="text/javascript">
             Telerik.Web.UI.Editor.CommandList["InsertSpecialLink"] = function (commandName, editor, args) {
                 var elem = editor.getSelectedElement(); //returns the selected element.

                 if (elem.tagName == "A") {
                     argument = elem;
                 else {
                     //remove links if present from the current selection - because of JS error thrown in IE

                     //remove Unlink command from the undo/redo list
                     var commandsManager = editor.get_commandsManager();
                     var commandIndex = commandsManager.getCommandsToUndo().length - 1;

                     var content = editor.getSelectionHtml();

                     var link = editor.get_document().createElement("A");

                     link.innerHTML = content;
                     argument = link;

                 var myCallbackFunction = function (sender, args) {
                     editor.pasteHtml(String.format("<a href={0} target='{1}' class='{2}'>{3}</a> ", args.href,, args.className,

                      'Insert Link',
                      Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,

  2. Ianko
    Ianko avatar
    1956 posts

    Posted 25 Sep 2013 Link to this post

    Hello Abhay,

    For the desired customization you could modify the built-in dialog (LinkManager) with the desired elements. This approach is described with step by step demonstration in this online demo.

    About the InsertSpecialLink tool I suppose that you are trying to use the dialog from our Custom Dialogs demo. In addition to complete this customization you should have the InsertLink.aspx file in the root folder of the application with accordingly implemented logic.

    When a custom dialog is used, its implementation is in a different aspx file, which is called via request trough the showExternalDialog() method.

    Currently I can only make assumptions on why this warning is thrown, although I can suggest you to check if the tool's name is the same as in the CommandList["ToolsName"].

    Let me know if you need further assistance on this matter.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top