This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

diezit.
diezit.

In my richeditor i am missing the "Heading 5" and "Heading 6". Is there any way how to add these in my toolbar?

joaocosta.azores20952
joaocosta.azores20952

In your plugin boot add

public function boot()
{
     \Backend\Classes\Controller::extend(function($controller) {
        $controller->addJs('/plugins/author/plugin/assets/js/froala.js');
    });
}

Then create your file froala.js in the path you've set in your boot and add:

+function ($) { "use strict";
    $(document).render(function() {
        if ($.FroalaEditor) {
            $.FroalaEditor.DEFAULTS = $.extend($.FroalaEditor.DEFAULTS, {
                paragraphFormat: {
                    N: 'Normal',
                    H1: 'Heading 1',
                    H2: 'Heading 2',
                    H3: 'Heading 3',
                    H4: 'Heading 4',
                    H5: 'Heading 5',
                    H6: 'Heading 6'
                }
            });
        }
    })
}(window.jQuery);

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.