• For a custom theme, the editors want to be able to select three different font sizes in the post editor.

    I thought about using a standard font size plus defining two extra classes:
    <p class="bigger">
    and
    <p class="smaller">
    Therefore I define the following formats in tiny_mce_before_init:

    $style_formats = array(
        array(
            'title'    => 'bigger paragraph',
            'block' => 'p',
            'exact'    => true,
            'classes'  => 'bigger',
        ),
        array(
            'title'    => 'smaller paragraph',
            'block' => 'p',
            'exact'    => true,
            'classes'  => 'smaller',
        ),
    );

    The formats do get displayed in the formats dropdown box and do work.

    Unfortunately, they can be selected together, which results in Markup like this:
    <p class="bigger smaller">
    Where am I going wrong?

  • The topic ‘tiny_mce_before_init: 'exact' => true has no effect’ is closed to new replies.