Tag creation

2 posts, 0 answers
  1. Andreas Kleine
    Andreas Kleine  avatar
    5 posts
    Member since:
    Oct 2007

    Posted 17 Apr 2008 Link to this post


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


    ".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?


    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,
  2. George
    George avatar
    859 posts

    Posted 21 Apr 2008 Link to this post

    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/ 
    and add the following tool:

    <tool name="FormatBlock"/>

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

    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,
    the Telerik team

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