• Resolved meneldil

    (@meneldil)


    I want to know if it is possible to wrap multiple items in a div with TinyMCE? (to apply a particular style)
    I want to avoid using a shortcode.

    Here is my setup:

    $style_formats = array(
        array(
            'title' => 'Title with list',
            'block' => 'div',
            'classes' => 'my-class',
            'wrapper' => true,
        ),
    );

    The result:

    <div class="my-class"><h3>Title</h3></div>
    <ul>
        <li>
            <div class="my-class">Some text...</div>
        </li>
        <li>
            <div class="my-class">Some text...</div>
        </li>
        <li>
            <div class="my-class">Some text...</div>
        </li>
    </ul>

    But I want to have something like this:

    <div class="my-class">
        <h3>Title</h3>
        <ul>
            <li>Some text...</li>
            <li>Some text...</li>
            <li>Some text...</li>
        </ul>
    </div>

    I wonder if this is possible.
    Thanks in advance ! 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘WordPress TinyMCE : Wrap several elements in DIV’ is closed to new replies.