• How can I change the default <p> padding size

    When I click the increase indent, I get this: ‘<p style=”padding-left: 30px;”></p>’
    But I want it to be this instead’ <p style=”padding-left: 15px;”></p>’
    and then increase in 15’s each time it is used.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Within the post editor screen?

    I believe you can add a function to modify the indentation size, as suggested here.

    Hope this helps.

    Thread Starter ABCDiamond

    (@abcdiamond)

    Thanks for that. It looks right, but I can’t work out which file needs editing.

    I tried the edit in style.css but that had no effect.

    I least I feel closer, knowing it can be done.

    If anyone knows where to do the edit, that would be good ??

    You can add this to your Child Theme functions.php file:

    function modify_tinymce_settings($settings) {
        $settings['indentation'] = '15px';
        return $settings;
    }
    add_filter('tiny_mce_before_init', 'modify_tinymce_settings');

    Hope this helps.

    Thread Starter ABCDiamond

    (@abcdiamond)

    That appears to have done the trick. Thank you.

    My function.php in the child theme now consists of this:

    <?php
    /** 
     * Name: Add/amend Parent Function
     */
    
    function modify_tinymce_settings($settings) {
        $settings['indentation'] = '15px';
        return $settings;
    }
    add_filter('tiny_mce_before_init', 'modify_tinymce_settings');
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can I change the default padding size from 30 to 15’ is closed to new replies.