techfox-editor
v1.0.2
Published
TechFox DecoupledEditor customize
Downloads
4
Maintainers
Readme
CKEditor 5 document editor build
Quick start
First, install the build from npm:
npm install --save techfox-editor
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/techfox-editor/build/ckeditor.js"></script>
<script>
TechfoxEditor
.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( error => {
console.error( 'There was a problem initializing the editor.', error );
} );
</script>
Or in your JavaScript application:
import TechfoxEditor from 'techfox-editor';
// Or using the CommonJS version:
// const TechfoxEditor = require( 'techfox-editor' );
TechfoxEditor
.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( error => {
console.error( 'There was a problem initializing the editor.', error );
} );