CKEditor 5 classic editor build
The classic editor build for HD.
Installation
First, install the build from npm:
npm install --save @samhammer/hd-ckeditor5-build-classic
And use it in your website:
<div id="editor">
<p>This is the editor content.</p>
</div>
<script src="./node_modules/@ckeditor/ckeditor5-build-classic/build/ckeditor.js"></script>
<script>
ClassicEditor
.create( document.querySelector( '#editor' ) )
.then( editor => {
window.editor = editor;
} )
.catch( error => {
console.error( 'There was a problem initializing the editor.', error );
} );
</script>
Or in your JavaScript application:
import ClassicEditor from '@samhammer/hd-ckeditor5-build-classic';
// Or using the CommonJS version:
// const ClassicEditor = require( '@ckeditor/ckeditor5-build-classic' );
ClassicEditor
.create( document.querySelector( '#editor' ) )
.then( editor => {
window.editor = editor;
} )
.catch( error => {
console.error( 'There was a problem initializing the editor.', error );
} );
Local development
To test your changes to this build locally with the application you can use npm link.
Publish new version
- Apply all changes to the source files.
- Run
npm run build
. - The compiled files are located in the "build" folder now.
- Raise the version-number in package.json.
- Commit all changes and create a git tag with the specific version number.
- Run
npm publish --access public
to publish the compiled source as new package version to npm. This step can only be done from a member of the "Samhammer" npm Org. - Install the new package version in the application as dependency.
License
Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md
file.