Skip to content

Coursemology/CKEditor5-build-coursemology

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CKEditor 5 Custom Build for Coursemology

This custom build was generated by the online builder tool.

Configuring build

The base configuration of the editor is available in the src/ckeditor.js file.

Adding plugins

If you are adding plugins, make sure that the plugin's major version is similar to the rest of the plugins in this build.

For example, at the time of writing, most of the plugins are at version 34.0.1. So, find the plugin in The npm Registry, sniff out the version closest to the major version, and install that instead.

Note Make sure to install the plugin as a development dependency.

For example, to install @ckeditor/ckeditor5-media-embed at version 34.0.1, run the following command.

yarn add -D @ckeditor/ckeditor5-media-embed@^34.0.1

Warning Using plugins of differing major versions can result in unexpected behaviours. For example, ckeditor-duplicated-modules.

Rebuilding

After making any changes to the configuration, you need to rebuild the editor before it can be imported in Coursemology. To rebuild the editor, you need to install all the dependencies.

yarn install

Then, destroy the previous build and rebuild with webpack.

rm -rf build
yarn build

The package is now ready to be imported.

Local testing

There's no Hot Module Replacement, because this is not an Node app, but a package. You can local test your new custom build by linking it with Yarn.

In this repository's root directory, run:

yarn link

You should see a message that gives you the following command that you should run in Coursemology's client root directory.

yarn link "@ckeditor/ckeditor5-build-custom"

You can now import the editor, even if @ckeditor/ckeditor5-build-custom is not listed in your package.json.

import CustomEditor from "@ckeditor/ckeditor5-build-custom";

If you already have an existing package installed with the same name, this should take precedence over the existing package.

Unlinking

In this repository's root directory, run:

yarn unlink

In Coursemology's client root directory, run:

yarn unlink "@ckeditor/ckeditor5-build-custom"

Contributing

Note that unlike most Node production apps, the build directory must be committed. This is the actual package that is imported in Coursemology.

Even if you didn't change anything, rebuilding will most likely generate a different build. This is normal. Just make sure you're committing only when there are tangible changes to this custom build.

Also, commit yarn.lock.

Upgrading

Just ensure that when upgrading any @ckeditor/* packages to a higher major version, other @ckeditor/* packages are also upgraded to the same major version.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%