ckeditor5-custom-build-full-feature
v1.0.0
Published
A full feature custom build of CKEditor
Downloads
6
Maintainers
Readme
CKEditor 5 full feature build
基于document build修改,新增FontColor、FontBackgroundColor、ImageTextAlternative、ImageResize、import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat';特性
Quick start
First, install the build from npm:
npm install --save ckeditor5-custom-build-full-feature
And use it in your website:
<div id="toolbar-container"></div>
<div id="editor">
<p>This is the editor content.</p>
</div>
<script src="./node_modules/ckeditor5-custom-build-full-feature/build/ckeditor.js"></script>
<script>
DecoupledEditor
.create( document.querySelector( '#editor' ) )
.then( editor => {
// The toolbar needs to be explicitly appended.
document.querySelector( '#toolbar-container' ).appendChild( editor.ui.view.toolbar.element );
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
</script>
Or in your JavaScript application:
import DecoupledEditor from '@ckeditor/ckeditor5-build-decoupled-document';
// Or using the CommonJS version:
// const DecoupledEditor = require( '@ckeditor/ckeditor5-build-decoupled-document' );
DecoupledEditor
.create( document.querySelector( '#editor' ) )
.then( editor => {
// The toolbar needs to be explicitly appended.
document.querySelector( '#toolbar-container' ).appendChild( editor.ui.view.toolbar.element );
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );