Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate source-editing #102

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions admin/src/components/CKEditorInput/Configurator.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import ckeditor5SpecialCharactersDll from "@ckeditor/ckeditor5-special-character
import ckeditor5TableDll from "@ckeditor/ckeditor5-table/build/table.js";
import ckeditor5WordCountDll from "@ckeditor/ckeditor5-word-count/build/word-count.js";
import ckeditor5MaximumLengthDll from "@reinmar/ckeditor5-maximum-length/build/maximum-length.js";
import ckeditor5SourceEditinDll from "@ckeditor/ckeditor5-source-editing/build/source-editing.js";
import ckeditor5GeneralHtmlSupportDll from "@ckeditor/ckeditor5-html-support/build/html-support.js";
import { StrapiMediaLib } from "./plugins/StrapiMediaLib";

const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
Expand All @@ -49,7 +51,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
window.CKEditor5.table.TableColumnResize,
window.CKEditor5.table.TableCaption,
window.CKEditor5.wordCount.WordCount,
StrapiMediaLib
window.CKEditor5.sourceEditing.SourceEditing,
window.CKEditor5.htmlSupport.GeneralHtmlSupport,
StrapiMediaLib,
],
toolbar: [
'undo', 'redo',
Expand All @@ -60,7 +64,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
'|',
'link', 'strapiMediaLib', 'insertTable',
'|',
'bulletedList', 'numberedList'
'bulletedList', 'numberedList',
'|',
'sourceEditing',
],
heading: {
options: [
Expand Down Expand Up @@ -118,7 +124,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
window.CKEditor5.table.TableColumnResize,
window.CKEditor5.table.TableCaption,
window.CKEditor5.wordCount.WordCount,
StrapiMediaLib
window.CKEditor5.sourceEditing.SourceEditing,
window.CKEditor5.htmlSupport.GeneralHtmlSupport,
StrapiMediaLib,
],
toolbar: [
'undo', 'redo',
Expand All @@ -129,7 +137,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
'|',
'link', 'strapiMediaLib', 'mediaEmbed', 'blockQuote', 'insertTable', 'codeBlock',
'|',
'bulletedList', 'numberedList', 'outdent', 'indent'
'bulletedList', 'numberedList', 'outdent', 'indent',
'|',
'sourceEditing',
],
heading: {
options: [
Expand Down Expand Up @@ -212,7 +222,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
window.CKEditor5.table.TableCaption,
window.CKEditor5.wordCount.WordCount,
window.CKEditor5.highlight.Highlight,
StrapiMediaLib
window.CKEditor5.sourceEditing.SourceEditing,
window.CKEditor5.htmlSupport.GeneralHtmlSupport,
StrapiMediaLib,
],
toolbar: {
items: [
Expand All @@ -230,7 +242,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
'|',
'alignment',
'|',
'bulletedList', 'numberedList', 'todoList', 'outdent', 'indent',
'bulletedList', 'numberedList', 'todoList', 'outdent', 'indent',
'|',
'sourceEditing',
],
shouldNotGroupWhenFull: true
},
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@ckeditor/ckeditor5-highlight": "^41.2.1",
"@ckeditor/ckeditor5-horizontal-line": "^41.2.1",
"@ckeditor/ckeditor5-html-embed": "^41.2.1",
"@ckeditor/ckeditor5-html-support": "^41.2.1",
"@ckeditor/ckeditor5-image": "^41.2.1",
"@ckeditor/ckeditor5-indent": "^41.2.1",
"@ckeditor/ckeditor5-language": "^41.2.1",
Expand All @@ -51,6 +52,7 @@
"@ckeditor/ckeditor5-paste-from-office": "^41.2.1",
"@ckeditor/ckeditor5-react": "^6.2.0",
"@ckeditor/ckeditor5-remove-format": "^41.2.1",
"@ckeditor/ckeditor5-source-editing": "^41.2.1",
"@ckeditor/ckeditor5-special-characters": "^41.2.1",
"@ckeditor/ckeditor5-table": "^41.2.1",
"@ckeditor/ckeditor5-theme-lark": "^41.2.1",
Expand All @@ -72,4 +74,4 @@
"npm": ">=6.0.0"
},
"license": "MIT"
}
}
Loading