Install
Works with Drupal: ^10.3 || ^11 || ^12Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Boxout is now a CKEditor 5 plugin. CKEditor 4 was removed
from Drupal core in 10, and it took the whole of the old integration with it,
so this release is a rewrite of the editor side of the module rather than a
compatibility fix.
Requirements
Drupal 10.3, 11 or 12, and the core CKEditor 5 module.
core_version_requirement is ^10.3 || ^11 || ^12.
For Drupal 8 and 9 stay on 8.x-1.2, which is the CKEditor 4 version. It is not
going away, but it will not gain anything either.
Your content does not change
The box is stored exactly as 8.x-1.x stored it:
<div class="boxout default"> <h2 class="boxout-header">Header</h2> <p>Body</p> </div>
Existing boxes are recognised by the new plugin and load into the editor as
boxes. There is no migration and no update hook.
What is different to use
The dialog is gone. Clicking the Boxout button now inserts the box straight
into the page, and you type into the header and the body in place, the way you
would with any other content. The style and the header element are dropdowns
on the toolbar, which act on whichever box the cursor is in.
Because of that there are three toolbar items instead of one. On each text
format at /admin/config/content/formats, drag in:
- Boxout, to insert a box
- Boxout style, to switch between Default and Plain
-
Boxout header element, to render the header as a paragraph
or as headings 2 to 5
Adding them updates the format's allowed HTML tags for you, so a format using
"Limit allowed HTML tags" does not need editing by hand.
Composer
This is a major version bump, so an existing constraint will not pick it up:
composer require 'drupal/boxout:^2.0'Why a beta
The editing experience is completely new and nobody has used it in anger yet.
The automated coverage is good — three functional JavaScript tests drive the
real editor in a browser, and they pass on 10.6.15, 11.4.5 and 12.0-dev — but
that is not the same as a week of real authoring. Please report anything odd
before this becomes 2.0.0.
Also in this release
-
The module now has a GitLab CI pipeline. There was none, only a CircleCI
config pinned to the Drupal 8 image. -
composer.jsonhad a duplicaterequirekey, so the
empty second one won and the PHP constraint was being dropped silently. - The README covers the new toolbar items, and the build and test commands.
For anyone building on it
The plugin sources are in js/ckeditor5_plugins/boxout/src and are
built into js/build/boxout.js, which is committed because the
drupal.org pipeline has no JavaScript build step. Rebuild with
npm install && npm run build.
One thing worth knowing if you maintain a CKEditor 5 plugin yourself: Drupal
12 loads CKEditor 5 as a flat UMD global and keeps only a deprecated DLL shim,
whose dll() returns the bundle rather than a require function, so
a build using DllReferencePlugin fails there. See
change record 3581531.
Boxout uses webpack externals that resolve either way at runtime, so one build
serves 10, 11 and 12.
Ported in
#3619574.