CKEditor 5 Nettskjema build
A CKEditor 5 build with all the plugins needed for Nettskjema
Why do we need this?
We need additional plugins for the editor, and when importing these in a next-project there are problems loading global css. Therefore we have to bundle everything ourselves and consume it. See this issue for details.
npm i @wapp-usit/ckeditor
If you only want to do changes on the editor itself in isolation
npm run dev and open
sample/index.html in your browser.
On macOS, you can e.g. run:
open -a Google\ Chrome sample/index.html
For local development within the Nettskjema React app:
npm run dev
npm linkin this folder
- Go to your nettskjema-next folder
npm link @wapp-usit/ckeditor
Once you are done:
npm unlink --no-save @wapp-usit/ckeditor ; npm i
This will install the package from NPM again and unlink the local one
Note: You might have to restart the next server and
.next folder in root after (un)linking.
Also, you might have to
rm -rf node_modules ; npm i if the link somehow has been messed up.
Publishing the package
Currently the package is hosted on USITs NPM org.
Set up 2FA on auth + push on your NPM-account and request access to the org. Up the version number and run