11.2.0-beta.4 • Published 7 years ago
ckeditor5-build-classic-strapi v11.2.0-beta.4
CKEditor 5 classic editor build for strapi-plugin-upload-ckeditor
The classic editor build for CKEditor 5. It is used in conjunction with strapi-plugin-upload-ckeditor
Quick start
Install the build from npm:
npm i -S ckeditor5-build-classic-strapi
And use it in your website:
<div id="editor">
<p>This is the editor content.</p>
</div>
<script src="./node_modules/ckeditor5-build-classic-strapi/build/ckeditor.js"></script>
<script>
ClassicEditor
.create( document.querySelector( '#editor' ) )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
</script>
JavaScript application:
import ClassicEditor from 'ckeditor5-build-classic-strapi';
// Or using the CommonJS version:
// const ClassicEditor = require( 'ckeditor5-build-classic-strapi' );
ClassicEditor
.create( document.querySelector( '#editor' ) )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
Or in your Vuejs application:
npm i -S @ckeditor/ckeditor5-vue
// main.js
import Vue from 'vue'
import Ckeditor from '@ckeditor/ckeditor5-vue'
Vue.use(Ckeditor)
<template>
<ckeditor ref="ckeditor" :editor="editor" v-model="editorData" :config="editorConfig"></ckeditor>
</template>
<script>
import ClassicEditor from 'ckeditor5-build-classic-strapi'
export default {
data() {
return {
editor: ClassicEditor,
editorData: "<p>Content of the editor.</p>",
editorConfig: {
uploadStrapi: {
token: 'YOUR_STRAPI_TOKEN',
uploadUrl: 'http://localhost:1337/upload-ckeditor'
}
},
};
}
};
</script>
Note: you might want to use this package to handle the upload strapi-plugin-upload-ckeditor
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.