Kendo Editor - How to handle line-height

4 posts, 0 answers
  1. Suresh
    Suresh avatar
    2 posts
    Member since:
    Nov 2013

    Posted 15 Dec 2014 Link to this post

    I'm using Kendo Editor content to generate PDF. The PDF looks awkward because of line-height. 

    How to handle line-height in Editor?
  2. Dimo
    Admin
    Dimo avatar
    8457 posts

    Posted 17 Dec 2014 Link to this post

    Hello Suresh,

    You can inject stylesheets inside the Editor like this:

    http://demos.telerik.com/kendo-ui/editor/styles

    There is no requirement to use a custom "Formatting" tool in the Editor toolbar in this case.

    If the Editor is in "inline mode", you don't even need the above approach, because the editable content is on the main page, and not in an iframe.

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Suresh
    Suresh avatar
    2 posts
    Member since:
    Nov 2013

    Posted 17 Dec 2014 in reply to Dimo Link to this post

    Can we inject style tag instead of class? There reason is PDF's with css styles steets are hard. 
  4. Dimo
    Admin
    Dimo avatar
    8457 posts

    Posted 19 Dec 2014 Link to this post

    Hello Suresh,

    I am afraid you can't inject <style> tags inside the Editor. The external stylesheets inside the Editor iframe are registered with <link> tags. You can use any CSS rules inside these stylesheets and you are not required to use custom CSS classes. If this will not work for you, then you can apply inline styles to DOM elements inside the Editor's body before exporting, using standard Javascript DOM manipulation techniques. The container element of the Editor's content is:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/editor#fields-body

    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