+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / RadEditor - Paragraph Styles

RadEditor - Paragraph Styles

4 posts, 0 answered
  1. Byzza
    Byzza avatar
    89 posts
    Registered:
    09 Jul 2007
    22 Mar 2010
    Link to this post
    Hi,

    I'm having trouble with the GenericContent and RadEditor.  The Paragraph style drop down isn't displaying the correct formatting.  when used its fine in the content window, just not the drop down.

    See images attached.

    Thank you in advance for any help you can offer.

    Regards
    Byron
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    26 Mar 2010
    Link to this post
    Hello Byzza,

    Most probably you have not applied style element to the paragraphs. Please consider the sample below

    <paragraphs>
        <paragraph name="&lt;H1>Heading 1&lt;/H1>" value="&lt;H1>" />
        <paragraph name="&lt;H2 style='font-family: Trebuchet MS;'>Heading 2&lt;/H2>" value="&lt;H2 style='font-family: Trebuchet MS;'>" />
        <paragraph name="&lt;H3 class='serif'>Heading 3&lt;/H3>" value="&lt;H4 class='serif'>" />
        <paragraph name="&lt;H4 style='font-family: Arial Black;'>Heading 4&lt;/H4>" value="&lt;H5 style='font-family: Arial Black;'>" />
        <paragraph name="&lt;H5 style='font-family: Impact;'>Heading 5&lt;/H5>" value="&lt;H6 style='font-family: Impact;'>" />
      </paragraphs>


    You could take a look at Editor / Paragraph Styles demo.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Steven Harrap
    Steven Harrap avatar
    13 posts
    Registered:
    26 Sep 2012
    09 Jun 2010
    Link to this post
    Hi

    I'm having a similar problem (perhaps)

    I have adjusted the EditorToolsFile.xml so that the paragraphs section is so:

    <paragraphs
    <paragraph name="<p>x Normal Paragraph</p>" value="<p>" /> 
    <paragraph name="<H2 style='font-size: 25px; color:#808080'>x Heading 1</H2>" value="<H2>" /> 
    <paragraph name="<H3 style='font-size: 20px; color:#808080'>x Heading 2</H3>" value="<H3>" /> 
    <paragraph name="<H4 style='font-size: 18px; color:#808080'>x Heading 3</H4>" value="<H4>" /> 
    <paragraph name="<H5 style='font-size: 16px; color:#808080'>x Heading 4</H5>" value="<H5>" /> 
    <paragraph name="<H6 style='font-size: 15px; color:#808080'>x Heading 5</H6>" value="<H6>" /> 
    </paragraphs>

     

    (note the "x" in the names and that the < are actually &lt; to prevent errors.)

    I prevent the user from using H1 because H1 is for the site heading of the page - the content uses H2 through H6.

    When I select a piece of text and select the paragraph drop down I can select the appropriate heading type (and I can see the "x"). When I click on the text again to see its heading type the drop down changes to "Heading N" where N is the heading number of the formated text not the "x Heading N" that I originally made.

    Its confusing for the content entry people as the software appears to be disagreeing with their previous selection. Is there anything I can do about this?

    Thanks,
    Steven.

     

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    09 Jun 2010
    Link to this post
    Hi Steven Harrap,

    When you click on a text the RadEditor looks into the HTML. If you switch to html mode you will see that the tags are something like

    <h2>test</h2>  -  your heading 1
    <h3>test</h3>   - your heading 2
    <h4>test</h4> - your heading 3

    The RadEditor does not resolve the heading by name.It resolve it by value. You could map the GenericContentDesigner template and subscribe for OnClientSelectionChange  and access the FormatBlock and modify its value

    function OnClientSelectionChange(editor, args) {
        var tool = editor.getToolByName("FormatBlock");
        tool.set_text("sasdas");
    }




    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
4 posts, 0 answered