-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CKEditor5: Use npm instead of package (#2789)
* CKEditor5: Use npm instead of package relates to xibosignageltd/xibo-private#718 relates to xibosignage/xibo#3546
- Loading branch information
1 parent
f10bfe7
commit 6a77bd0
Showing
89 changed files
with
1,196 additions
and
504 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,189 @@ | ||
/* | ||
* Copyright (C) 2024 Xibo Signage Ltd | ||
* | ||
* Xibo - Digital Signage - https://xibosignage.com | ||
* | ||
* This file is part of Xibo. | ||
* | ||
* Xibo is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* any later version. | ||
* | ||
* Xibo is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Xibo. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
import { | ||
ClassicEditor, | ||
InlineEditor, | ||
AccessibilityHelp, | ||
Alignment, | ||
Autoformat, | ||
AutoImage, | ||
Autosave, | ||
BlockQuote, | ||
Bold, | ||
CloudServices, | ||
Essentials, | ||
FontBackgroundColor, | ||
FontColor, | ||
FontFamily, | ||
FontSize, | ||
Heading, | ||
HorizontalLine, | ||
ImageBlock, | ||
ImageCaption, | ||
ImageInline, | ||
ImageInsertViaUrl, | ||
ImageResize, | ||
ImageStyle, | ||
ImageTextAlternative, | ||
ImageToolbar, | ||
ImageUpload, | ||
Indent, | ||
IndentBlock, | ||
Italic, | ||
Link, | ||
LinkImage, | ||
List, | ||
ListProperties, | ||
Paragraph, | ||
SelectAll, | ||
SpecialCharacters, | ||
SpecialCharactersArrows, | ||
SpecialCharactersCurrency, | ||
SpecialCharactersEssentials, | ||
SpecialCharactersLatin, | ||
SpecialCharactersMathematical, | ||
SpecialCharactersText, | ||
Table, | ||
TableCaption, | ||
TableCellProperties, | ||
TableColumnResize, | ||
TableProperties, | ||
TableToolbar, | ||
TextTransformation, | ||
TodoList, | ||
Underline, | ||
Undo, | ||
} from 'ckeditor5'; | ||
|
||
import 'ckeditor5/ckeditor5.css'; | ||
|
||
const config = { | ||
toolbar: { | ||
items: [ | ||
'undo', | ||
'redo', | ||
'fontFamily', | ||
'fontSize', | ||
'fontColor', | ||
'fontBackgroundColor', | ||
'alignment', | ||
'outdent', | ||
'indent', | ||
'|', | ||
'bold', | ||
'italic', | ||
'underline', | ||
'strikethrough', | ||
'subscript', | ||
'superscript', | ||
'|', | ||
'bulletedList', | ||
'numberedList', | ||
'blockQuote', | ||
'insertTable', | ||
'horizontalLine', | ||
'specialCharacters', | ||
'|', | ||
'heading', | ||
], | ||
shouldNotGroupWhenFull: true, | ||
}, | ||
plugins: [ | ||
AccessibilityHelp, | ||
Alignment, | ||
Autoformat, | ||
AutoImage, | ||
Autosave, | ||
BlockQuote, | ||
Bold, | ||
CloudServices, | ||
Essentials, | ||
FontBackgroundColor, | ||
FontColor, | ||
FontFamily, | ||
FontSize, | ||
Heading, | ||
HorizontalLine, | ||
ImageBlock, | ||
ImageCaption, | ||
ImageInline, | ||
ImageInsertViaUrl, | ||
ImageResize, | ||
ImageStyle, | ||
ImageTextAlternative, | ||
ImageToolbar, | ||
ImageUpload, | ||
Indent, | ||
IndentBlock, | ||
Italic, | ||
Link, | ||
LinkImage, | ||
List, | ||
ListProperties, | ||
Paragraph, | ||
SelectAll, | ||
SpecialCharacters, | ||
SpecialCharactersArrows, | ||
SpecialCharactersCurrency, | ||
SpecialCharactersEssentials, | ||
SpecialCharactersLatin, | ||
SpecialCharactersMathematical, | ||
SpecialCharactersText, | ||
Table, | ||
TableCaption, | ||
TableCellProperties, | ||
TableColumnResize, | ||
TableCellProperties, | ||
TableProperties, | ||
TableToolbar, | ||
TextTransformation, | ||
TodoList, | ||
Underline, | ||
Undo, | ||
], | ||
language: 'en-gb', | ||
image: { | ||
toolbar: [ | ||
'imageTextAlternative', | ||
'toggleImageCaption', | ||
'imageStyle:inline', | ||
'imageStyle:block', | ||
'imageStyle:side', | ||
], | ||
}, | ||
table: { | ||
contentToolbar: [ | ||
'tableColumn', | ||
'tableRow', | ||
'mergeTableCells', | ||
'tableProperties', | ||
'tableCellProperties', | ||
], | ||
}, | ||
}; | ||
|
||
ClassicEditor.defaultConfig = config; | ||
InlineEditor.defaultConfig = config; | ||
|
||
window.CKEDITOR = { | ||
ClassicEditor, | ||
InlineEditor, | ||
}; |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.