Skip to content

Commit

Permalink
CKEditor5: Use npm instead of package
Browse files Browse the repository at this point in the history
relates to xibosignageltd/xibo-private#718

 - CKEditor local bundle removed
  • Loading branch information
maurofmferrao committed Nov 4, 2024
1 parent e370397 commit 2da73f2
Show file tree
Hide file tree
Showing 87 changed files with 1,072 additions and 501 deletions.
880 changes: 880 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"bootstrap-tagsinput": "^0.7.1",
"chart.js": "^2.9.4",
"chartjs-plugin-datalabels": "1.0.0",
"ckeditor5": "^43.3.0",
"codemirror": "^6.0.1",
"colors.js": "~1.2.4",
"corejs-typeahead": "^1.3.3",
Expand Down
187 changes: 187 additions & 0 deletions ui/bundle_wysiwyg_editor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
/*
* 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,
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',
],
},
};

ClassicEditor.defaultConfig = config;
InlineEditor.defaultConfig = config;

window.CKEDITOR = {
ClassicEditor,
InlineEditor,
};
1 change: 1 addition & 0 deletions ui/src/style/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
.ck-editor__editable_inline {
outline-color: $xibo-color-accent;
outline-style: solid;
border-radius: 0 !important;
}

&.source {
Expand Down
21 changes: 0 additions & 21 deletions ui/src/vendor/ckeditor/LICENSE.md

This file was deleted.

70 changes: 0 additions & 70 deletions ui/src/vendor/ckeditor/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions ui/src/vendor/ckeditor/build/ckeditor.d.ts

This file was deleted.

7 changes: 0 additions & 7 deletions ui/src/vendor/ckeditor/build/ckeditor.js

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/vendor/ckeditor/build/ckeditor.js.map

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/vendor/ckeditor/build/translations/af.js

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/vendor/ckeditor/build/translations/ar.js

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/vendor/ckeditor/build/translations/ast.js

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/vendor/ckeditor/build/translations/az.js

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/vendor/ckeditor/build/translations/bg.js

This file was deleted.

1 change: 0 additions & 1 deletion ui/src/vendor/ckeditor/build/translations/bn.js

This file was deleted.

Loading

0 comments on commit 2da73f2

Please sign in to comment.