Classic Editor

DemoGrouped Toolbar Example
View on GitHub
Hello World

Implementation

This example demonstrates how to use grouped toolbars in CKEditor 5. Configure it in the initializer:

presets.define :grouped_toolbar do
  toolbar do
    group :text_formatting, label: 'Text Formatting', icon: 'threeVerticalDots' do
      append :bold, :italic, :underline, :strikethrough, separator,
             :subscript, :superscript, :removeFormat
    end

    append separator
    append :bulletedList, :numberedList, :outdent, :indent
    # ...other toolbar items...
  end
end

Then in the view:

<% content_for :head do %>
  <%= ckeditor5_assets preset: :grouped_toolbar %>
<% end %>

<%= ckeditor5_editor %>

Additional Resources