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

Tag creation

1 Answer 41 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Andreas Kleine
Top achievements
Rank 1
Andreas Kleine asked on 17 Apr 2008, 07:33 AM
Hi,

I have definded some Wiki-Styles to the cssEditor.css

e.g.

".noteimportant{-moz-border-radius-bottomleft:20px;-moz-border-radius-bottomright:20px;-moz-border-radius-topleft:20px;-moz-border-radius-topright:20px;background-position:20px 50%;background-repeat:no-repeat;border-collapse:collapse;clear:both;margin:2em auto;min-height:40px;padding:15px 20px 15px 80px;text-align:justify;vertical-align:middle;background-color:#ffc;background-image:url(CSSImages/important.png);"


I enterd the following text in HTML-View...

"1st line
2nd line"

...and applied the style .notewarning

The Editor creates the following Code:
"
<p> </p><font class="notewarning">1st line<br />2nd line</font>
"

The result doesn't look nice in HTML-View
After I replace "font" with "div" all looks nice(as expected)


How can I configure the editor, to create different Tags with different styles?

e.g.

for styles like "div.styleNAMExyz{background-color:red;}" the editor creates "<div class="styleNAMExyz">1st line<br />2nd line</div>"
and for styles like "font.styleNAMExyz{background-color:red;}" the editor creates "<font class="styleNAMExyz">1st line<br />2nd line</font>"

Best would be dynamic, for styles like "tagNameXYZ.styleNAMExyz{background-color:red;}"
the editor creates  "<tagNameXYZ class="styleNAMExyz">1st line<br />2nd line</tagNameXYZ>"

Maybe it's all about configuration.
Or you add this feature to your next version?


kind regards,
Andreas

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 21 Apr 2008, 03:18 PM
Hi Andreas,

Currently, the only way to achieve the desired functionality is by using the editor's FormatBlock tool.

To enable the FormatBlock tool, you need to modify the ToolsFile.xml which is located in the following folder: /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/4.5.0.0__1f131a624888eeed/RadControls/Editor/ 
and add the following tool:

<tool name="FormatBlock"/>
.......................

<paragraphs>
  <paragraph name="&lt;H1>Heading 1&lt;/H1>" value="&lt;H1>" />
  <paragraph name="&lt;H2>Heading 2&lt;/H2>" value="&lt;H2" />
  <paragraph name="&lt;H3>Heading 3&lt;/H3>" value="&lt;H3" /> 
  <paragraph name="Custom" value="&lt;h2 class=\custom\>" />
</paragraphs>
</root>

To enable the FormatBlock tool in List (Wiki) scenario, modify the ListToolsFile.xml file.

In addition to this, please, review the following help articles:
I hope this helps.

Sincerely yours,
George
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
WebParts for SharePoint
Asked by
Andreas Kleine
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or