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

9 posts, 0 answers
  1. Sue
    Sue avatar
    3 posts
    Member since:
    Mar 2007

    Posted 08 Mar 2007 Link to this post

    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?



     

  2. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 09 Mar 2007 Link to this post

    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

  3. Sue
    Sue avatar
    3 posts
    Member since:
    Mar 2007

    Posted 12 Mar 2007 Link to this post

    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

  4. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 14 Mar 2007 Link to this post

    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
  5. Sue
    Sue avatar
    3 posts
    Member since:
    Mar 2007

    Posted 27 Mar 2007 Link to this post

    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"/>

  6. tcrawford24
    tcrawford24 avatar
    9 posts
    Member since:
    Mar 2007

    Posted 28 Mar 2007 Link to this post

    Thank you for giving us this alternative.  We too do not need to be cross browser compatible.   This solution appears to work great.

    Tom
  7. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 30 Mar 2007 Link to this post

    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
  8. Gavin Pollock
    Gavin Pollock  avatar
    62 posts
    Member since:
    Jan 2005

    Posted 28 May 2008 Link to this post

    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
  9. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 02 Jun 2008 Link to this post

    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
Back to Top