If you do not want to fork the official build, you can just clone it. However, you will not be able to commit and push your customizations back to GitHub.

Alternatively, instead of creating a custom build you can integrate CKEditor 5 directly from source. This option allows for even more flexibility and requires less overhead (you will not need to fork the official build). However, it requires that you fully control the webpack.config.js file (which is not that easy in some environments — for example in angular-cli or create-react-app).

It is important that you use the stable branch of a build, not the master branch. The master branch might contain changes which are not yet compatible with the versions of CKEditor 5 source packages that were published on npm.

build/ckeditor.js – The ready-to-use editor bundle, containing the editor and all plugins.

src/ckeditor.js – The source entry point of the build. Based on it the build/ckeditor.js file is created by webpack. It defines the editor creator, the list of plugins and the default configuration of a build.

First, you need to install dependencies which are already specified in the build’s package.json:

npm install

Then, you can add missing dependencies (i.e. packages you want to add to your build). The easiest way to do so is by typing:

npm install --save-dev <package-name>

This will install the package and add it to package.json. You can also edit package.json manually.

Due to the non-deterministic way how npm installs packages, it is recommended to run rm -rf node_modules && npm install when in doubt. This will prevent some packages from getting installed more than once in node_modules/ (which might lead to broken builds).

If you added or removed dependencies, you will also need to modify the src/ckeditor.js file.

Every plugin that you want to include in the bundle should be added at this stage. You can also change the editor creator and specify the default editor configuration. For instance, your webpack entry file (src/ckeditor.js) may look like this:

You may decide to update your build at any time. Since it is a fork of the official build, you can simply merge the changes that happened meanwhile in that build, using Git commands:

git fetch upstream
git merge upstream/stable

You should handle eventual conflicts and verify the merged changes. After that, just follow the previous instructions for creating your build and test it.

It is recommended to run rm -rf node_modules && npm install after you fetched changes from the upstream or updated versions of dependencies in package.json manually. This will prevent npm from installing packages more than once (which may lead to broken builds).

If you think that your custom builds can be useful to others, it is a great idea to publish them on GitHub and npm. When doing so, just be sure to give them meaningful names that would fit the ckeditor5-build-(the name) pattern, making them easy to find. To avoid conflicts with other existing builds you can use scoped packages. We also recommend using the “ckeditor5” and “ckeditor5-build” keywords to make your build easier to find.