This repository acts as a separated source for the custom CKEditor5 builds referenced in OpenProject.
https://github.com/opf/openproject
https://github.com/ckeditor/ckeditor5
- Install the dependencies
# In this repository's root (commonmark-ckeditor-build)
npm install
- Reference the link in OpenProject
export OPENPROJECT_CORE=/path/to/openproject/root
Building into the core is easy, just run
npm run build
This will override the app/assets/javascripts/vendor/ckeditor/* contents with the newest webpack build. You need to run this before opening a pull request.
Important
Please ensure that for any changes in this repository, you have a core repository with the output of npm run build, so that all core tests can run and confirm your changes. Both pull requests should always be merged at the same time, never alone
Whenever a new CKEditor release is made, there are a plethora of packages to be updated. The easiest is to use npm-check-updates to update all dependencies in the package.json and then rebuild + run openproject tests.
We use patch-package (https://www.npmjs.com/package/patch-package) to store a patch for the ckeditor5-mention plugin to ensure multiple-hash mentions for work packages (e.g., ###2134) work correctly. See https://community.openproject.org/work_packages/47084 for context.
- Run
npm run watch
Now the webpack development mode is building the files and outputting them to app/assets/javascripts/vendor/ckeditor/*, overriding anything in there.
As of version 11.2.0, this library no longer uses jQuery internally. All jQuery dependencies have been replaced with vanilla JavaScript equivalents using Request.JS and native DOM manipulation.
Important for downstream consumers (e.g., OpenProject): While this library no longer uses jQuery internally, downstream applications should continue to expose the jQuery global if other parts of the application depend on it. Do not remove the jQuery global from the downstream application (OpenProject) yet until all components have been migrated.
For more details on the downstream migration, see: opf/openproject#19429