Picked color is not applied in HTML code

5 posts, 0 answers
  1. Jan
    Jan avatar
    5 posts
    Member since:
    Mar 2016

    Posted 06 Jun Link to this post

    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?

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 08 Jun Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Jan
    Jan avatar
    5 posts
    Member since:
    Mar 2016

    Posted 08 Jun in reply to Alexander Popov Link to this post

    Fine - color is added in style of span tag, but still I can't give color to indexes of ordered or unordered list.
  5. Jan
    Jan avatar
    5 posts
    Member since:
    Mar 2016

    Posted 08 Jun Link to this post

    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
  6. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 10 Jun Link to this post

    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.
     
Back to Top
Kendo UI is VS 2017 Ready