ckeditor5-build-tape

1.0.2 • Public • Published

ckeditor5-build-tape

Quick start

First, install the build from npm:

npm install --save ckeditor5-build-tape

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-build-tape/build/ckeditor.js"></script>
<script>
	TapeEditor
		.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 TapeEditor from 'ckeditor5-build-tape';

// Or using the CommonJS version:
// const TapeEditor = require( 'ckeditor5-build-tape' );

TapeEditor
	.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 );
	} );

Note: If you are planning to integrate CKEditor 5 deep into your application, it is actually more convenient and recommended to install and import the source modules directly (like it happens in ckeditor.js). Read more in the Advanced setup guide.

/ckeditor5-build-tape/

    Package Sidebar

    Install

    npm i ckeditor5-build-tape

    Weekly Downloads

    0

    Version

    1.0.2

    License

    GPL-2.0-or-later

    Unpacked Size

    5.28 MB

    Total Files

    63

    Last publish

    Collaborators

    • liangmayong