|
@@ -0,0 +1,41 @@
|
|
|
|
|
+/**
|
|
|
|
|
+ * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
|
|
|
|
|
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+/* globals console, window, document */
|
|
|
|
|
+
|
|
|
|
|
+import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
|
|
|
|
+import Enter from '@ckeditor/ckeditor5-enter/src/enter';
|
|
|
|
|
+import Typing from '@ckeditor/ckeditor5-typing/src/typing';
|
|
|
|
|
+import Heading from '@ckeditor/ckeditor5-heading/src/heading';
|
|
|
|
|
+import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
|
|
|
|
|
+import Highlight from '@ckeditor/ckeditor5-highlight/src/highlight';
|
|
|
|
|
+import Table from '@ckeditor/ckeditor5-table/src/table';
|
|
|
|
|
+import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
|
|
|
|
|
+import Undo from '@ckeditor/ckeditor5-undo/src/undo';
|
|
|
|
|
+import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';
|
|
|
|
|
+import List from '../../src/list';
|
|
|
|
|
+import TodoList from '../../src/todolist';
|
|
|
|
|
+
|
|
|
|
|
+ClassicEditor
|
|
|
|
|
+ .create( document.querySelector( '#editor' ), {
|
|
|
|
|
+ plugins: [ Enter, Typing, Heading, Highlight, Table, Bold, Paragraph, Undo, List, TodoList, Clipboard ],
|
|
|
|
|
+ language: 'ar',
|
|
|
|
|
+ toolbar: [
|
|
|
|
|
+ 'heading', '|', 'bulletedList', 'numberedList', 'todoList', '|', 'bold', 'highlight', 'insertTable', '|', 'undo', 'redo'
|
|
|
|
|
+ ],
|
|
|
|
|
+ table: {
|
|
|
|
|
+ contentToolbar: [
|
|
|
|
|
+ 'tableColumn',
|
|
|
|
|
+ 'tableRow',
|
|
|
|
|
+ 'mergeTableCells'
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ } )
|
|
|
|
|
+ .then( editor => {
|
|
|
|
|
+ window.editor = editor;
|
|
|
|
|
+ } )
|
|
|
|
|
+ .catch( err => {
|
|
|
|
|
+ console.error( err.stack );
|
|
|
|
|
+ } );
|