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

Editor Content Padding Issue

1 Answer 128 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nariman
Top achievements
Rank 1
Nariman asked on 10 Dec 2013, 08:14 AM
Hi, we are trying to add content padding to the editor. We used the following method to do it, which it works but the problem with this method is, as soon as we set the padding the Scrollbar of the Editor will become visible even though there is not content in it. Herewith below is our way to add content padding to the Editor:

$("#details").data("kendoEditor").body.style.padding = "5px";

Please advise:
1. What is the best way to add content padding to the Editor?
2. If the above method is recommended, how can we solve the unnecessary Scrollbar activation issue?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 10 Dec 2013, 11:24 AM
Hi Nariman,

By default, the Editor's <body> and <html> elements have a 100% heght style, so that it can be focused even if the user clicks on an empty place below all content. Generally, 100% high elements cannot have margins, paddings, borders and siblings, because content overflow occurs or scrollbars appear.

You have two options, which are possible to achieve via a custom stylesheet inside the Editor, or via the code that you have used already.

1. Remove the 100% heights and use the default "auto" height style.
2. Set some height in pixels, in accordance with the Editor's height.

Alternatively...

3. Use an inline Editor.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Editor
Asked by
Nariman
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or