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

Problem with custom paragraph style

3 Answers 105 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Peter Livsey
Top achievements
Rank 1
Peter Livsey asked on 22 Apr 2008, 11:47 AM

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

3 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 22 Apr 2008, 01:21 PM
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
0
Peter Livsey
Top achievements
Rank 1
answered on 22 Apr 2008, 01:39 PM
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.
0
Accepted
Lini
Telerik team
answered on 23 Apr 2008, 05:11 PM
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
Tags
WebParts for SharePoint
Asked by
Peter Livsey
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Peter Livsey
Top achievements
Rank 1
Lini
Telerik team
Share this question
or