Install N1ED plugin for CKEditor 5
N1ED comes to CKEditor 5 as one plugin: the blocks with a responsive Bootstrap or Tailwind grid, and the Flmngr file manager with the Image42 (formerly ImgPen) image editor. Which of them your editor runs is set for your API key in the same Dashboard as for TinyMCE and CKEditor 4, with no change to the build. The other N1ED features will come to CKEditor 5 later.
Plugin
Install NPM package
The N1ED plugin is distributed in one npm package that is easy to add into your existing CKEditor 5 build project for further compilation.
npm install --save-dev @edsdk/n1ed-ckeditor5Moving from
@edsdk/blk42-ckeditor5or@edsdk/flmngr-ckeditor5? Replace them, don't add to them: remove their imports and theirBlk42/Flmngrentries fromplugins. An old version left in the build next to N1ED stops CKEditor 5 before it starts (two plugins namedFlmngr).Include to build
Add N1ED into your import section:
import {
ClassicEditor,
Image,
Essentials,
Paragraph,
Bold,
Italic
} from 'ckeditor5';
import N1ED from "@edsdk/n1ed-ckeditor5";Then pass it to the
pluginssection of yourClassicEditorcreation method call, put the three file manager buttons on the toolbar and set the API key:ClassicEditor.create(
document.querySelector('#editor'), // your editor selector
{
licenseKey: "GPL", // or your commercial key: CKEditor 5 v44+ will not start without one
plugins: [
Essentials,
Paragraph,
Bold,
Italic,
Image, // the standard image plugin, the file manager needs it
N1ED
],
toolbar: [
'bold',
'italic',
'|',
'upload', // the three
'flmngr', // buttons
'imgpen' // of Flmngr
],
apiKey: "N1ED24RR1234123412341234", // the demo key; yours is in the Dashboard: https://n1ed.com/dashboard
}
).then( editor => {
console.log(editor);
} ).catch( error => {
console.error(error.stack);
} );The key decides what runs. The blocks, the file manager and the image editor are the plugin checkboxes of your key in the Dashboard, and a change there needs no rebuild. No need for the file manager? Switch it off there, or with
N1ED: { plugins: { Flmngr: false } }in the editor's config, and leave its buttons out of the toolbar.Build
Build your CKEditor 5 project or your project with CKEditor 5 imported to apply the newly added plugin.
If you see the file manager buttons on the toolbar and a new bottom toolbar of the editor, everything works fine.
Install backend
Now you need to install the file manager server-side script on your server to enable the file manager in your editor. Follow the instructions provided in the link to complete the setup.
Ready to Use
Ready-to-Use Bundle
Download
The ready-to-use CKEditor 5 bundle already contains the N1ED plugin, precompiled and enabled, with the file manager buttons on the toolbar and Bootstrap or Tailwind layouts from the start. Just download and use it, HTML sample included.
Download BundleUnpack
The archive contains the compiled build and a ready-made sample page:
build/
ckeditor5-n1ed.js
ckeditor5-n1ed.js.map
sample/
index.html
styles.cssOpen
sample/index.htmlright from your disk to see the editor running — no webserver needed. When you are ready to install it, copybuild/ckeditor5-n1ed.jssomewhere into your webserver public directory, for example:var/
www/
public/
js/
ckeditor5-n1ed.jsThe
.mapfile is optional: it is what turns a minified stack trace back into readable line numbers if you ever need to report a problem.Attach to content box
Add the script link onto your page and initialize CKEditor 5 there, attaching it to the textarea or some div with the content you want to edit.
<script src="/js/ckeditor5-n1ed.js"></script>
<script type="text/javascript">
CKEditor5WithN1ED.create(
document.querySelector('#editorId'),
{
// apiKey: "...",
// Get your own key in the Dashboard: https://n1ed.com/dashboard
}
);
</script>No need for the file manager? Switch it off in the Dashboard, or pass
removePlugins: ['Flmngr']: the bundle switches it off and its buttons leave the toolbar too.Link your storage
Only link your storage when you are ready: install the file manager server-side script on your server.
Ready to Use
CDN
Add the CDN Script
One script loads CKEditor 5 with the N1ED plugin enabled and preconfigured, always the latest version.
<!-- Load CKEditor 5 with N1ED -->
<script src="https://cloud.n1ed.com/v/latest/sdk/ckeditor5-n1ed.js"></script>
<!-- Your editor placeholder -->
<div id="editorId"></div>
<script type="text/javascript">
CKEditor5WithN1ED.create(
document.querySelector('#editorId'),
{
// apiKey: "...",
// Get your own key in the Dashboard: https://n1ed.com/dashboard
}
);
</script>Link your storage
Only link your storage when you are ready: install the file manager server-side script on your server.
Ready to Use
Configuration
The plugin checkboxes of your key in the Dashboard decide which parts run in CKEditor 5, the blocks, the file manager and the image editor, with no rebuild. Configure them there too: link the file storage, set the Bootstrap or Tailwind options and your own blocks, all without touching the code.
DashboardExamples
Live CodePlay examples for CKEditor 5 with the JS/CSS/HTML code provided.