This is a migrated thread and some comments may be shown as answers.

Disable Document Manager

10 Answers 168 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Henrik
Top achievements
Rank 1
Henrik asked on 28 Mar 2011, 10:17 AM
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

10 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 29 Mar 2011, 04:03 PM
0
Henrik
Top achievements
Rank 1
answered on 30 Mar 2011, 07:15 AM
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.
0
Henrik
Top achievements
Rank 1
answered on 30 Mar 2011, 08:01 AM
works :)
0
Henrik
Top achievements
Rank 1
answered on 04 Apr 2011, 01:55 PM
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.
0
Rumen
Telerik team
answered on 05 Apr 2011, 03:19 PM
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
0
Henrik
Top achievements
Rank 1
answered on 11 Apr 2011, 09:10 AM
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?
0
Henrik
Top achievements
Rank 1
answered on 12 Apr 2011, 09:54 AM
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.
0
Rumen
Telerik team
answered on 14 Apr 2011, 08:31 AM
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.

0
Muhammed
Top achievements
Rank 1
answered on 05 Mar 2015, 05:56 AM
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>


0
Ianko
Telerik team
answered on 05 Mar 2015, 08:27 AM
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.

 
Tags
Editor
Asked by
Henrik
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Henrik
Top achievements
Rank 1
Rumen
Telerik team
Muhammed
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or