Block Class

Allows users to assign custom CSS classes to text blocks, enabling personalized styling and enhanced visual formatting within the editor.

Click on any block, then on the 'control' menu icon on the left and you will see the 'Classname' option in the dropdown. Try adding a note note-notice class to any text block and see the result.

Code

<!DOCTYPE html>
<html>
    <head>
        <title>Redactor</title>
        <meta charset="utf-8">

        <!-- css -->
        <link rel="stylesheet" href="/your-folder/redactor.css" />
    </head>
    <body>
        <!-- element -->
        <textarea id="entry">...</textarea>

        <!-- js -->
        <script src="/your-folder/redactor.js"></script>
        <script src="/your-folder/plugins/blockclass/blockclass.js"></script>

        <!-- call -->
        <script>
        Redactor('#entry', {
            plugins: ['blockclass']
        });
        </script>
    </body>
</html>