Html Mode

4 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 05 Nov 2015 Link to this post

    1) Is there no way to globally just have the editor indent the html when it goes to that mode?

    2) How do we stop the wrapping of content with spans having inline styling line-height (BLOATED markup)

  2. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 09 Nov 2015 Link to this post

    Hello Steve,

    The Editor's "View HTML" tool allows viewing and editing the widget's raw HTML value. Indeed, formatting that value would be beneficial for the advanced end users that may rely on direct HTML manipulation. I can't seem to find such a feature request on our feedback portal, so please consider submitting one, so that we can evaluate the demand for it and prioritize accordingly.

    http://kendoui-feedback.telerik.com/

    The Editor is also designed to use inline elements to apply inline formatting, hence the usage of <span> elements in the mentioned case. In theory, it would be possible to look for suitable existing elements to apply the styles to, but that would considerably increase the implementation complexity, so we have opted for a more streamlined and less error-prone approach.

    Regards,
    Dimo
    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. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 09 Nov 2015 in reply to Dimo Link to this post

    @Dimo

    Thanks for the reply...regarding #2, I'm not sure what you mean...can the browser just not handle displaying the html?  Why do we need everything wrapped in like <span> with line-height 1.5?  Means I have to override the generated markup.

  5. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 11 Nov 2015 Link to this post

    Hi Scott,

    My assumption is that we are talking about the Editor adding multiple <span> elements to the HTML content when the user applies formatting styles to content, which includes multiple sibling block elements. This is needed, because inline formatting is applied via inline elements. Since inline elements cannot contain block elements, each block element receives an inline child with the specified inline formatting style.

    Imagine the following scenario: a bold style or line-height or whatever style needs to be applied to the second half of a list item and the first half of the next list item. There is no other way to achieve this other than using two child elements, one for each list item. A similar logic is followed in other scenarios as well. Even if in certain cases it is possible to assign the style to a single parent element, the Editor is designed to work in the above described way, so that it uses the same algorithm in all cases.

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready