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

Format not applied to styled HTML

2 Answers 87 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Larissa
Top achievements
Rank 1
Larissa asked on 21 Feb 2018, 06:50 PM

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 Answers, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 23 Feb 2018, 09:40 AM
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.
0
Larissa
Top achievements
Rank 1
answered on 23 Feb 2018, 04:18 PM
Thanks for your help!
Tags
Editor
Asked by
Larissa
Top achievements
Rank 1
Answers by
Neli
Telerik team
Larissa
Top achievements
Rank 1
Share this question
or