Take a look at our new Article and Redactor X editors.

Change formatting dropdown

This example shows how to change the default set of formatting items in the dropdown.

    By default the set is:

    ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5']

    Let's change it. Click to the formatting dropdown to see the result.


    <!-- element -->
    <textarea id="content"></textarea>
    <!-- call -->
    $R('#content', { formatting: ['p', 'blockquote', 'h2'] });