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

Can you combine buttons from radEditor and SharePoint's HTML Editor?

8 Answers 289 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Sue
Top achievements
Rank 1
Sue asked on 08 Mar 2007, 04:29 PM
I would like to use the radEditor table functionality but also want the 'insert hyperlink' and 'insert image' dialogs from the SharePoint HTML editor.

I guess there are 2 approaches:
(1) using the radEditor and plumbing in the Sharepoint dialogs...I have done this to some extent by changing MOSSEditorTools.js. I noticed some code to do this already for the hyperlink manager
ie Change
RadEditorCommandList["MOSSLinkManager"]
to
RadEditorCommandList["LinkManager"]
...which plumbs in this code.

The problem is the getting the values back in when editing an existing hyperlink as this code is commented out:
//configObj.DefaultAssetImageLocation=RTE2_GetDialogParameter(strBaseElementID, "DefaultAssetImageLocation");
...any idea how to get the parameters needed?

I did something similar for the image manager, but same issue, not sure how to pick up values when editing an existing one.

(2) The seocnd approach is to use the radEditor table editing dialog in the out-of-the-box SharePoint control. I know you can add custom buttons in, but am unsure of what script to use to hook it up to the Table Wizard. Is this possible?



 

8 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 09 Mar 2007, 04:30 PM
Hi Sue,

At first, we also tried to use the original asset picker dialogs in our editor. This was the preferred approach, because users will have the same experience with the default MOSS editor and our offering. Unfortunately, the asset picker dialogs (template, image, and hyperlink) are not cross-browser compatible. They work OK on Internet Explorer and Safari, but have problems returning the selected item in Firefox.

If you are still interested in using the original asset picker dialogs, I will send you an updated MOSSEditorTools.js file and you will just need to modify your editor ToolsFile.xml to enable the MOSS tools.

Kind regards,
Lini
the telerik team
0
Sue
Top achievements
Rank 1
answered on 12 Mar 2007, 09:11 AM

Yes please, I do not need to be cross – browser compatible as the webpage editing is all done in-house. That code will be very useful.

Thanks
Sue

0
Lini
Telerik team
answered on 14 Mar 2007, 10:56 AM
Hello Sue,

First of all, in order to use the original SharePoint dialogs, you need to register an additional script files on your page. These files are automatically included when you open a page with the default editor, but since we do not use the default dialogs anymore, you will have to include them manually. You can do that using the SharePoint Designer -  add the files either in your master page or only on the pages that use our editor. Here is the code for the asset pickers script:

<script type="text/javascript" language="javascript" src="/_layouts/1033/AssetPickers.js?rev=pwrdokZjl1CAXjNxKmD8Ug%3D%3D"></script> 
<script type="text/javascript" language="javascript" src="/_layouts/1033/HtmlEditor.js?rev=2cuqL%2BXsKvVQbLcDImkXPQ%3D%3D"></script> 


Next, you need to update the MOSSEditorTools.js with the version I am attaching to this message. The JS file is located by default in C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.0.0.0__1f131a624888eeed\RadControls\Editor\Scripts\7_0_2\.

Next, you need to edit the editor's tools file - C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.0.0.0__1f131a624888eeed\RadControls\Editor\ToolsFile.xml and add the MOSS tools instead of the default ones. The MOSS tools have the same names plus a prefix "MOSS". For example: MOSSImageManager, MOSSLinkManager.

Finally you need to add icons for the custom tools in the editor toolbar. The toolbar button images are located in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.0.0.0__1f131a624888eeed\RadControls\Editor\Skins\Default\Buttons\ folder. Copy or rename the original ImageManager.gif to MOSSImageManager.gif, etc.

If you have questions about any of the steps above, feel free to ask and I will give you more details.

Greetings,
Lini
the telerik team
0
Sue
Top achievements
Rank 1
answered on 27 Mar 2007, 09:26 AM
This works well, thanks

One small thing though....how do I change the text when the mouse hovers over the icon? I have tried adding a title attribute in ToolsFile.xml but this does not seem to get picked up.

    <tool name="MOSSImageManager" shortcut="CTRL+G"  title="Insert Image"/>

0
tcrawford24
Top achievements
Rank 1
answered on 28 Mar 2007, 12:32 PM
Thank you for giving us this alternative.  We too do not need to be cross browser compatible.   This solution appears to work great.

Tom
0
Dimitar Milushev
Telerik team
answered on 30 Mar 2007, 11:11 AM
Hi Sue,

To change the tooltip that appears on hover, you need to edit the localization files of the editor. For the English version, these files can be found at \RadControls\Editor\Localization\en-US. For other languages, look for the corresponding directory in \RadControls\Editor\Localization.

Editing the .xml files should be straightforward, but feel free to contact us if any questions arise.

Sincerely yours,
Dimitar Milushev
the telerik team

Instantly find answers to your questions at the new telerik Support Center
0
Gavin Pollock
Top achievements
Rank 1
answered on 28 May 2008, 02:30 PM
Hi there,

Is it possible to get this article updated to the current version of the SharePoint editor? We are using 4.5.0.3 and would really like this function.

Cheers
Gavin
0
Lini
Telerik team
answered on 02 Jun 2008, 06:42 AM
Hi Gavin,

The original image, link, and reusable content pickers are built into the current RadEditor for MOSS release. To use them, open the editor's tools file and add the tools MOSSImageManager, MOSSLinkManager, and MOSSTemplateManager. For more information, see the following links:

http://www.telerik.com/help/moss/editor/removing%20tools%20from%20the%20toolbar.html
http://www.telerik.com/help/moss/editor/what_is_the_difference_between_the_internal_editor_and_moss_dialogs.html

Regards,
Lini
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
WebParts for SharePoint
Asked by
Sue
Top achievements
Rank 1
Answers by
Lini
Telerik team
Sue
Top achievements
Rank 1
tcrawford24
Top achievements
Rank 1
Dimitar Milushev
Telerik team
Gavin Pollock
Top achievements
Rank 1
Share this question
or