Problem with custom paragraph style

4 posts, 2 answers
  1. Peter Livsey
    Peter Livsey avatar
    44 posts
    Member since:
    Aug 2012

    Posted 22 Apr 2008 Link to this post

    Hi

    I've editted the ToolsFile.xml file that we use to add the following section at the end of the file to limit the paragraph styles available in the editor:
    ......
       <paragraphs>
        <paragraph name="&lt;h2>Heading 2&lt;/h2>" value="&lt;h2" />
        <paragraph name="&lt;h3>Heading 3&lt;/h3>" value="&lt;h3" />
        <paragraph name="&lt;h4>Heading 4&lt;/h4>" value="&lt;h4>" />
      </paragraphs>
    </root>

    In the editor we have some text that looks like this in html view
    Hello <br />
    <br />
    This is our new site

    When I highlight the 'Hello' line and select the Heading 2 style from the dropdown the style is not correctly applied.  The html created is:
    <h>Hello </h><br />
    <br />
    This is our new site

    What is wrong with the paragraph tags that I've added to the ToolsFile.xml?

    Thanks
    Peter

  2. Answer
    Rumen
    Admin
    Rumen avatar
    12849 posts

    Posted 22 Apr 2008 Link to this post

    Hello Peter,

    You should close the h2 and h3 tags in the value attribute, e.g

       <paragraphs>
        <paragraph name="&lt;h2>Heading 2&lt;/h2>" value="&lt;h2>" />
        <paragraph name="&lt;h3>Heading 3&lt;/h3>" value="&lt;h3>" />
        <paragraph name="&lt;h4>Heading 4&lt;/h4>" value="&lt;h4>" />
      </paragraphs>


    Please, try the code above and let us know if you still experience any problems.

    All the best,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

  3. Peter Livsey
    Peter Livsey avatar
    44 posts
    Member since:
    Aug 2012

    Posted 22 Apr 2008 Link to this post

    Thanks Rumen, that got it sorted.  I should have spotted that the h2 and h3 tags were setup differently to the h4 that was working!!

    Another quick question... we're looking at customising the editor toolbar further by adding our own custom buttons.  Is there any documentation for the Moss RadEditor that gives examples of how to do this, or explains the features in general that are available? 

    I've found out quite a lot of helpful information in these forums about customising the toolsfile and config file but it would be useful to have some documentation that listed options that can be added to the xml files to configure the editor.
  4. Answer
    Lini
    Admin
    Lini avatar
    2144 posts

    Posted 23 Apr 2008 Link to this post

    Hi Peter,

    You can use the normal RadEditor documentation for more information about the tools file and adding custom tools. Here are some direct links to the help topics - http://www.telerik.com/help/aspnet/editor/?ToolbarIntro.htmlhttp://www.telerik.com/help/aspnet/editor/?UsintTheToolsFile.htmlhttp://www.telerik.com/demos/aspnet/Editor/Examples/CustomTools/DefaultCS.aspx

    The only thing you need to do differently in a MOSS environment is the location of the custom tools script. Since there is no aspx page you can put the script, you need to add it at the end of the MOSSEditorTools.js file, located at \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.5.3.0__1f131a624888eeed\RadControls\Editor\Scripts\7_3_3\.

    Best wishes,
    Lini
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top