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

Display text on rad editor

4 Answers 66 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
sean
Top achievements
Rank 1
sean asked on 25 Aug 2009, 11:30 PM
We would like to display some copy & paste tips on the editor.  Is there a way I can display comments on the editor? Thanks.

4 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 26 Aug 2009, 06:33 AM
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.
0
sean
Top achievements
Rank 1
answered on 26 Aug 2009, 08:22 PM
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
0
Accepted
Stanimir
Telerik team
answered on 27 Aug 2009, 12:48 PM
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.
0
sean
Top achievements
Rank 1
answered on 27 Aug 2009, 03:43 PM
Thanks Stanimir. 
Tags
WebParts for SharePoint
Asked by
sean
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
sean
Top achievements
Rank 1
Share this question
or