jQWidgets Forums

jQuery UI Widgets Forums Editors Editor How to Add Padding to Content Area

This topic contains 2 replies, has 3 voices, and was last updated by  EricK 7 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • How to Add Padding to Content Area #97544

    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?

    How to Add Padding to Content Area #97566

    Hristo
    Participant

    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

    How to Add Padding to Content Area #97674

    EricK
    Participant

    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

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.