Display text on rad editor

5 posts, 1 answers
  1. sean
    sean avatar
    38 posts
    Member since:
    Jul 2008

    Posted 25 Aug 2009 Link to this post

    We would like to display some copy & paste tips on the editor.  Is there a way I can display comments on the editor? Thanks.
  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 26 Aug 2009 Link to this post

    Hi Sean,

    Could you please provide us with an image of where do you expect to show these comments? Also you can set the tool tips of the editor tools. You need to modify the respective tool in the ToolsFile.xml or ListToolsFile.xml. For example:
    <tool name="Paste" shortcut="CTRL+V" text="enter your description here" /> 



    Kind regards,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

  3. sean
    sean avatar
    38 posts
    Member since:
    Jul 2008

    Posted 26 Aug 2009 Link to this post

    Hi Stanimir,

    The tip can be at the top of the editor or right beneath the tool buttons. It is similar to the popup blocker warning on browsers. It basically a lable strip having same width as the editor and tells user that if the configured direct copy & paste doesn't work, please try to paste as plain text. 
    https://horizon.radrequest.com/images/help/popups/popup_1a.png

    I can use webcontrols.EditModePanel to do it, but I am curious that if there is an easy way to do it in the rad editor.

    Sean
  4. Answer
    Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 27 Aug 2009 Link to this post

    Hello Sean,

    Here is how you can achieve the desired functionality.
    1. Modify the respective ConfigFile.xml or ListConfigFile.xml. Add the following code.
    <property name="OnClientLoad">OnClientLoad</property> 

    2. Define the following javascript function.
    function OnClientLoad(editor, args) 
        var holder = $get(editor.get_id() + "Top");  
        var div = document.createElement("div"); 
        div.innerHTML = "This is a warning message!"
        holder.appendChild(div); 

    If you are using RadEditor for MOSS 5.x, you can add the javascript in the MOSSEditorTools.js. If you are using the lite version of the RadEditor for MOSS, you need to make sure that you put the client code somewhere on the page where the control is loaded. I prefer the mastertemplate.


    All the best,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. sean
    sean avatar
    38 posts
    Member since:
    Jul 2008

    Posted 27 Aug 2009 Link to this post

    Thanks Stanimir. 
Back to Top