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

Kendo Editor - How to handle line-height

3 Answers 422 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Suresh
Top achievements
Rank 1
Suresh asked on 15 Dec 2014, 01:05 PM
I'm using Kendo Editor content to generate PDF. The PDF looks awkward because of line-height. 

How to handle line-height in Editor?

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 17 Dec 2014, 08:41 AM
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!
 
0
Suresh
Top achievements
Rank 1
answered on 17 Dec 2014, 03:12 PM
Can we inject style tag instead of class? There reason is PDF's with css styles steets are hard. 
0
Dimo
Telerik team
answered on 19 Dec 2014, 08:31 AM
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!
 
Tags
General Discussions
Asked by
Suresh
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Suresh
Top achievements
Rank 1
Share this question
or