Disable Document Manager

11 posts, 1 answers
  1. Henrik
    Henrik avatar
    47 posts
    Member since:
    Dec 2010

    Posted 28 Mar 2011 Link to this post

    Hello Community,

    I want to disable the Document Manager. Using the ToolsFile.xml allows do disable it in the Toolbar only. But I want no icon in the Hyperlink Manager, too. Is this possible?

    Regards
    Henrik
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Henrik
    Henrik avatar
    47 posts
    Member since:
    Dec 2010

    Posted 30 Mar 2011 Link to this post

    Thanks for this link but I forgot to say that I am using the RadEditor for MOSS 2007. Is there a solution, too?
    I found a nice topic Link. But I guess this doesn't work to me? I am not able to copy the "EditorDialogs" folder because I don't have such folder Link.
  5. Henrik
    Henrik avatar
    47 posts
    Member since:
    Dec 2010

    Posted 30 Mar 2011 Link to this post

    works :)
  6. Henrik
    Henrik avatar
    47 posts
    Member since:
    Dec 2010

    Posted 04 Apr 2011 Link to this post

    In MOSS 2007 I am able to link for example to images very comfortable because there is a preview image.
    So I want to link to the MOSS DocManager by clicking the Icon that normaly contains the RAD DocManager in the LInkManager. Is there a way to do this?
    I don't want to lose the function to set bookmarks, but I want to combine it with the comfortable view of the MOSS Manager.

    Summarize: If I click on the DocManager icon in the LinkManager the "Select a link -- Webpage Dialog" from MOSS 2007 should appear.
  7. Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 05 Apr 2011 Link to this post

    Hello Henrik,

    The requested customization is not supported by Telerik, it is not easy to be implemented and we do not have a working example for it.

    If you would like you can try to implement it yourself by following as a base the instructions provided in the following help article Modifying RadEditor's built-in dialogs as well as the code of the MOSSLinkManager command located in the wpresources\RadEditorSharePoint\5.x.x.x__1f131a624888eeed\Resources\ MOSSEditorTools.js file:

    Telerik.Web.UI.Editor.CommandList["MOSSLinkManager"] = function(commandName, editor, args)
    {
        var params = editor._dialogParameters;
        var docEditor = editor.get_document();
        var configObj = new AssetPickerConfig("");
        configObj.ClientID = editor.get_id();
        configObj.DefaultAssetLocation = "";
        configObj.DefaultAssetImageLocation = "";
        configObj.CurrentWebBaseUrl = params["CurrentWebBaseUrl"];
        configObj.AllowExternalUrls = params["AllowExternalUrls"];
        var bInserting = false;
        var elemToReplace = null;
        var linkAsset = new LinkAsset("");
        var innerLinkHTML = null;
        linkAsset.ManageLinkDisplayText = false;
        var frameElementId = (editor.get_contentAreaMode() == Telerik.Web.UI.EditorContentAreaMode.Div) ? editor.get_contentArea().id : editor.get_contentWindow().frameElement.id;
        var elemLink = FormJSRTE_GetNearestContainingParentElementOfTypes(frameElementId, editor.getSelectedElement(), new Array("A"));
        if (!elemLink)
        {
            bInserting = true;
            elemLink = docEditor.createElement("A");
            if (elemLink == null) return;
            var editorSelection = editor.getSelection();
            if (editorSelection.isControl())
            {
                elemToReplace = editor.getSelectedElement();
            }
            else
            {
                innerLinkHTML = editorSelection.getHtml();
            }
        }
        else
        {
            innerLinkHTML = elemLink.innerHTML;
        }
        configObj.ReturnCallback = function(newAssetUrl, newAssetText, currentConfig, dialogReturnedData)
        {
            if (dialogReturnedData)
            {
                var linkText = "";
                if ($telerik.isIE)
                    linkText = elemLink.innerText;
                else
                    linkText = elemLink.textContent;
                if (innerLinkHTML && innerLinkHTML != "")
                {
                    elemLink.innerHTML = innerLinkHTML;
                }
                else if (linkText == "")
                {
                    if (linkAsset.AssetText && linkAsset.AssetText != "")
                    {
                        linkText = linkAsset.AssetText;
                    }
                    else
                    {
                        linkText = linkAsset.AssetUrl;
                    }
                    elemLink.innerHTML += linkText;
                }
                if (elemToReplace != null)
                {
                    var parentEl = elemToReplace.parentNode;
                    elemLink.innerHTML = "";
                    parentEl.insertBefore(elemLink, elemToReplace);
                    elemLink.appendChild(elemToReplace);
                    linkAsset.FixupIconsAndEmptyAnchors(elemLink);
                    return;
                }
                else if (bInserting)
                {
                    var selection = docEditor.selection;
                    if (selection != null)
                    {
                        var textRange = selection.createRange();
                        if (textRange != null)
                        {
                            var text = textRange.text;
                            if (text && text != "" && !text.match(/^\s+$/))
                            {
                                textRange.execCommand("Unlink");
                                elemLink.innerHTML = textRange.htmlText;
                                linkAsset.FixupIconsAndEmptyAnchors(elemLink);
                            }
                            var tempDiv = docEditor.createElement("DIV");
                            tempDiv.appendChild(elemLink);
                            textRange.pasteHTML(tempDiv.innerHTML);
                        }
                    }
                    else
                    {
                        //if we cannot get the selection, use the editor paste function instead
                        var tempDiv = docEditor.createElement("DIV");
                        var pNodes = elemLink.getElementsByTagName("P");
                        for (var i = 0, l = pNodes.length; i < l; i++)
                        {
                            Telerik.Web.UI.Editor.Utils.removeNode(pNodes[i]);
                        }
                        tempDiv.appendChild(elemLink);
                        editor.pasteHtml(tempDiv.innerHTML, commandName);
                        tempDiv = null;
                    }
                }
                else
                {
                    linkAsset.FixupIconsAndEmptyAnchors(elemLink);
                }
            }
        }
        linkAsset.LaunchModalDialogOnElement(configObj, elemLink, true, !bInserting);
    };


    All the best,
    Rumen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Henrik
    Henrik avatar
    47 posts
    Member since:
    Dec 2010

    Posted 11 Apr 2011 Link to this post

    Am I able to use this line of code?
    <%@ Register Tagprefix="CMS" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <
    CMS:AssetUrlSelector id="assetSelectedUrl" CssTextBox="ms-input ms-assethyperlinkdialog-longtextbox" MaxLength=512 DecodeUrlPath="false" AccessibilityName="<%$Resources:cms, assetedithyperlink_selectedurl_label%>" runat="server" />
    This is the link in the MOSS standard.
    The dialog is rendered correctly not very nice but correctly. But if I click the browse button an JavaScript error occurs (see iamge attached). Do you know this error?
  9. Henrik
    Henrik avatar
    47 posts
    Member since:
    Dec 2010

    Posted 12 Apr 2011 Link to this post

    I also tried the following code:

    <asp:Button ID="BrowseButton1" runat="server" Text="Browse" Width="75px" />

    Unfortunalety I don't know where to register the JavaScript function.

    Then I tried this solution:

    <button type="button" id="BrowseButton">
    <script type="text/javascript">
    setInnerHtml("BrowseButton", localization["Browse"]);
    </script>
    </button>

    I edited the JavaScript in the ascx too. I copied for example the code lines of the CancelButton and edited it. I also added a resource entry called "LinkManager_Browse". Doesn't work either.
  10. Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 14 Apr 2011 Link to this post

    Hello Henrik,

    We do not support customizations of the built-in dialogs of RadEditor and it is up to the developer working with the control to implement the needed changes. The implementation of the requested feature is complex task and we do not have a working solution for it.

    Kind regards,
    Rumen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  11. Muhammed
    Muhammed  avatar
    1 posts
    Member since:
    Sep 2014

    Posted 04 Mar 2015 in reply to Rumen Link to this post

    Hi Admin,

    How to disable Media manager and flash manager button in RadEditor.
    I want make some controls disable in tool strip of RadEditor on runtime.
    Please do the needfull

    Here is my Control

       <telerik:RadEditor ID="txtEmail" runat="server"  Height="590px" Skin="Telerik" 
                                Width="858px" IsSkinTouch="True"   AllowScripts="True">
                             <CssFiles>
                                <telerik:EditorCssFile Value="css/ContentAreaCssFile.css" />
                            </CssFiles>
                             <ImageManager AllowMultipleSelection="True" EnableAsyncUpload="True" MaxUploadFileSize="102400000" SearchPatterns="*.*" />
                               
                            </telerik:RadEditor>


  12. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 05 Mar 2015 Link to this post

    Hello Muhammed,

    This article--Removing Toolbar Buttons--explains how to customize the toolbar and remove some of the buttons.

    If you have further difficulties, please, open a support ticket with your enquiry and receive proper assistance.

    Regards,
    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017