forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SAK-42671 Sakai Editor Webcomponent CKEditor 5 (sakaiproject#7467)
* SAK-42671 Sakai Editor Webcomponent CKEditor 5 * Multiple editors * Add Ballon editor to super build * Updates
- Loading branch information
Showing
9 changed files
with
7,729 additions
and
668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"esversion":6 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
// The editor creator to use. | ||
import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; | ||
import InlineEditorBase from '@ckeditor/ckeditor5-editor-inline/src/inlineeditor'; | ||
import BalloonEditorBase from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor'; | ||
|
||
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials'; | ||
import UploadAdapter from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter'; | ||
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat'; | ||
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold'; | ||
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic'; | ||
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote'; | ||
import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder'; | ||
import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage'; | ||
import Heading from '@ckeditor/ckeditor5-heading/src/heading'; | ||
import Image from '@ckeditor/ckeditor5-image/src/image'; | ||
import ImageCaption from '@ckeditor/ckeditor5-image/src/imagecaption'; | ||
import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle'; | ||
import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar'; | ||
import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload'; | ||
import Link from '@ckeditor/ckeditor5-link/src/link'; | ||
import List from '@ckeditor/ckeditor5-list/src/list'; | ||
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed'; | ||
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; | ||
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice'; | ||
import Table from '@ckeditor/ckeditor5-table/src/table'; | ||
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar'; | ||
|
||
|
||
export class ClassicEditor extends ClassicEditorBase {} | ||
export class InlineEditor extends InlineEditorBase {} | ||
export class BalloonEditor extends BalloonEditorBase {} | ||
|
||
// Plugins to include in the build. | ||
const plugins = [ | ||
Essentials, | ||
UploadAdapter, | ||
Autoformat, | ||
Bold, | ||
Italic, | ||
BlockQuote, | ||
CKFinder, | ||
EasyImage, | ||
Heading, | ||
Image, | ||
ImageCaption, | ||
ImageStyle, | ||
ImageToolbar, | ||
ImageUpload, | ||
Link, | ||
List, | ||
MediaEmbed, | ||
Paragraph, | ||
PasteFromOffice, | ||
Table, | ||
TableToolbar | ||
]; | ||
|
||
// Editor configuration. | ||
const config = { | ||
toolbar: { | ||
items: [ | ||
'heading', | ||
'|', | ||
'bold', | ||
'italic', | ||
'link', | ||
'bulletedList', | ||
'numberedList', | ||
'imageUpload', | ||
'blockQuote', | ||
'insertTable', | ||
'mediaEmbed', | ||
'undo', | ||
'redo' | ||
] | ||
}, | ||
image: { | ||
toolbar: [ | ||
'imageStyle:full', | ||
'imageStyle:side', | ||
'|', | ||
'imageTextAlternative' | ||
] | ||
}, | ||
table: { | ||
contentToolbar: [ | ||
'tableColumn', | ||
'tableRow', | ||
'mergeTableCells' | ||
] | ||
}, | ||
// This value must be kept in sync with the language defined in webpack.config.js. | ||
language: 'en' | ||
}; | ||
|
||
BalloonEditor.builtinPlugins = plugins; | ||
BalloonEditor.defaultConfig = config; | ||
InlineEditor.builtinPlugins = plugins; | ||
InlineEditor.defaultConfig = config; | ||
ClassicEditor.builtinPlugins = plugins; | ||
ClassicEditor.defaultConfig = config; |
Oops, something went wrong.