Format not applied to styled HTML

3 posts, 0 answers
  1. Larissa
    Larissa avatar
    12 posts
    Member since:
    Jun 2014

    Posted 21 Feb Link to this post

    I have a dojo here to demonstrate the issue. 

    https://dojo.telerik.com/@smilelari/ejUtax/2

    When the text in the textarea is set to html that contains styling (like: <style type="text/css">.cs2654AE3A{text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt} .csC8F6D76{color:#000000;background-color:transparent;font-family:cursive;font-size:15pt;font-weight:normal;font-style:normal;}</style><p class="cs2654AE3A"><span class="csC8F6D76">Hello</span></p>), if you select text and then select a format from the format menu, the format (for example Heading 1) is not applied.  Any ideas how to fix this?  Thanks

  2. Neli
    Admin
    Neli avatar
    157 posts

    Posted 23 Feb Link to this post

    Hi Larissa,

    In the provided example, styles are applied to the element  with specified class. The styles for the respective class will be applied even after the formatting is executed. So, in the example after a 'Heading' is selected, the font-size will be set according to the css in 'csC8F6D76'
    <style type="text/css">.cs2654AE3A{text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0pt} .csC8F6D76{color:#000000;background-color:transparent;font-family:cursive;font-size:15pt;font-weight:normal;font-style:normal;}</style><p class="cs2654AE3A"><span class="csC8F6D76"

    In the following Dojo example, I removed the font styles and as you can see, the formatting is applied correctly. 


    Regards,
    Neli
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Larissa
    Larissa avatar
    12 posts
    Member since:
    Jun 2014

    Posted 23 Feb in reply to Neli Link to this post

    Thanks for your help!
Back to Top