This is a migrated thread and some comments may be shown as answers.
Picked color is not applied in HTML code
4 Answers 3 Views
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 06 Jun 2016, 11:31 AM

Hi,

I couldn't find why, but like in this example: http://dojo.telerik.com/@Janek91/eZUyI font color I'm picking from palette is not applied in HTML code. It's only adding <span> tag. In addition you can't select indexes of ordered or unordered list to change its colors. Can you help me?

4 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 08 Jun 2016, 06:03 AM
Hi Jan,

In this case I would recommend using the ng-model binding instead of the k-ng-model. This should guarantee that the model is being updated with the value of the textarea, rather than the value of the Editor widget.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jan
Top achievements
Rank 1
answered on 08 Jun 2016, 01:26 PM
Fine - color is added in style of span tag, but still I can't give color to indexes of ordered or unordered list.
0
Jan
Top achievements
Rank 1
answered on 08 Jun 2016, 01:39 PM
In addition - it's bad solution, because it converts HTML special characters to Unicode mark.
Please, compare this:
http://dojo.telerik.com/@Janek91/eZUyI/2
http://dojo.telerik.com/@Janek91/eZUyI/3
0
Alexander Popov
Telerik team
answered on 10 Jun 2016, 12:45 PM
Hello Jan,

I reviewed the examples you shared and noticed that ngSanitize and the ng-bind-html directive are used. It seems that the styles are stripped by that directive and there is not much we can do about it. Here is an updated example that illustrates that the model contains the expected value, however it is displayed in a different manner depending on whether ng-model or ng-bind-html directives are used by the textarea element. The inability to select and style the bullet points is a known limitation, caused by the fact that the style should actually be applied on the block element (<ol> at this case), which is non-selectable. I am afraid there is no simple, user-friendly workaround that I can suggest at this point.

Regards,
Alexander Popov
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Asked by
Jan
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Jan
Top achievements
Rank 1
Share this question
or