Replacing custom paragraph styles with the default ones does not work

2 posts, 0 answers
  1. Yuriy
    Yuriy avatar
    4 posts
    Member since:
    Mar 2012

    Posted 13 May 2014 Link to this post

    Hi Guys,

    I am experiencing the following problem:
    I created my custom paragraph style "Small" for the FormatBlock Dropdown. It wraps text in <smal> tag and works as as expected.
    However after applying this paragraph style it is not replaced with the <h1> etc. default styles when I choose them in the dropdown.
    Steps to reproduce:
    1. Put any text to the editor. For example: Test
    2. Select it and click on the custom "Small" style in the FormatBlock Dropdown.
         Result in the HTML view: <small>Test</small>.
    3. Select the word again and click Heading 1 default style.
        Result in the HTML view: <h1><small>Test</small></h1>.

    On the other hand when I choose Heading 1, Heading 2, Menu etc. default styles successively, the current value replaces the old one:
    <h1>Test</h1>  =>  <h2>Test</h2>  =>  <menu>Test</menu>  => ...

    Is this an expected behavior with the custom  paragraph style or not?
    Can you offer how to fix this issue in some simple way?

    Best Regards,
  2. Ianko
    Ianko avatar
    1510 posts

    Posted 14 May 2014 Link to this post

    Hello Yuriy,

    The Paragraph Style tool is implemented using native browser commands and its functionality is based on browser logic which is not controlled by the Editor.

    The mentioned behavior makes sense. The <small> tag is used as an inline element and as one its natural purpose is to be set as one, so the browser put is as a child and not as a replacement to the parent one. I suggest referring to this help material for more clarification on this matter.

    On a side note, if you need somehow a custom functionality, so that you can entirely change the design of the content I can suggest implementing an entirely Customized Dropdown Tool.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top