jQuery UI Widgets › Forums › General Discussions › Editors › Editor › How to Add Padding to Content Area
Tagged: editor, javascript editor, jquery editor, jqwidgets editor
This topic contains 2 replies, has 3 voices, and was last updated by EricK 8 years, 2 months ago.
I load the base css like this: href=”https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css” type=”text/css” /> I want to have some padding around the editor content, and tried to add padding as follows.
$(‘#editor’).jqxEditor({ height: ‘300px’, width: ‘630px’ }).addClass(‘.jqx-widget-content’);
A script in the .jqx-widget-content { padding 5px !important; }
What is the correct way to do this?
Hello andrewklukes@gmail.com,
You could create an initial container with settings that you want if you create the widget static. Please, take a look at this demo.
Best Regards, Hristo Hristov
jQWidgets team http://www.jqwidgets.com
Hello, Let me share a simple approach with jquery. Add this line bellow the editor configuration.
$(‘#editor’).contents().find(‘iframe’).contents().find(‘body’).css(‘padding’,’5px’);
This should resolve your issue.
Eric
You must be logged in to reply to this topic.