mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
webpack installation of ckeditor5
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
//require('@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css');
|
||||
|
||||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
||||
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
|
||||
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
|
||||
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
|
||||
import Markdown from '@ckeditor/ckeditor5-markdown-gfm/src/markdown';
|
||||
//require('./ckeditor5.css');
|
||||
|
||||
let Fields = document.querySelectorAll('textarea');
|
||||
|
||||
Fields.forEach(function(field) {
|
||||
ClassicEditor
|
||||
.create( field, {
|
||||
plugins: [
|
||||
Markdown,
|
||||
Essentials,
|
||||
Bold,
|
||||
Italic,
|
||||
],
|
||||
} )
|
||||
.then( editor => {
|
||||
console.log( editor );
|
||||
})
|
||||
.catch( error => {
|
||||
console.error( error );
|
||||
})
|
||||
;
|
||||
})
|
Reference in New Issue
Block a user