Skip to content
Open
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
58 changes: 50 additions & 8 deletions admin/src/components/CKEditorInput/Configurator.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ckeditor5CodeBlockDll from "@ckeditor/ckeditor5-code-block/build/code-blo
import ckeditor5EssentialsDll from "@ckeditor/ckeditor5-essentials/build/essentials.js";
import ckeditor5FontDll from "@ckeditor/ckeditor5-font/build/font.js";
import ckeditor5HeadingDll from "@ckeditor/ckeditor5-heading/build/heading.js";
import ckeditor5HighlightDll from '@ckeditor/ckeditor5-highlight/build/highlight.js';
import ckeditor5HtmlEmbedDll from "@ckeditor/ckeditor5-html-embed/build/html-embed.js";
import ckeditor5HorizontalLineDll from "@ckeditor/ckeditor5-horizontal-line/build/horizontal-line.js";
import ckeditor5MarkdownDll from '@ckeditor/ckeditor5-markdown-gfm/build/markdown-gfm';
Expand All @@ -17,7 +18,9 @@ import ckeditor5IndentDll from "@ckeditor/ckeditor5-indent/build/indent.js";
import ckeditor5LinkDll from "@ckeditor/ckeditor5-link/build/link.js";
import ckeditor5ListDll from "@ckeditor/ckeditor5-list/build/list.js";
import ckeditor5PasteFromOfficeDll from "@ckeditor/ckeditor5-paste-from-office/build/paste-from-office.js";
import ckeditor5FindAndReplaceDll from "@ckeditor/ckeditor5-find-and-replace/build/find-and-replace.js";
import ckeditor5RemoveFormatDll from "@ckeditor/ckeditor5-remove-format/build/remove-format.js";
import ckeditor5SpecialCharactersDll from "@ckeditor/ckeditor5-special-characters/build/special-characters.js";
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";
Expand Down Expand Up @@ -164,14 +167,21 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
window.CKEditor5.autoformat.Autoformat,
window.CKEditor5.basicStyles.Bold,
window.CKEditor5.basicStyles.Italic,
window.CKEditor5.basicStyles.Underline,
window.CKEditor5.basicStyles.Strikethrough,
window.CKEditor5.basicStyles.Code,
window.CKEditor5.basicStyles.Subscript,
window.CKEditor5.basicStyles.Superscript,
window.CKEditor5.blockQuote.BlockQuote,
window.CKEditor5.codeBlock.CodeBlock,
window.CKEditor5.essentials.Essentials,
window.CKEditor5.font.FontSize,
window.CKEditor5.font.FontFamily,
window.CKEditor5.font.FontColor,
window.CKEditor5.font.FontBackgroundColor,
window.CKEditor5.findAndReplace.FindAndReplace,
window.CKEditor5.heading.Heading,
window.CKEditor5.highlight.Highlight,
window.CKEditor5.horizontalLine.HorizontalLine,
window.CKEditor5.htmlEmbed.HtmlEmbed,
window.CKEditor5.image.Image,
Expand All @@ -185,10 +195,14 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
window.CKEditor5.link.Link,
window.CKEditor5.link.LinkImage,
window.CKEditor5.list.List,
window.CKEditor5.list.ListProperties,
window.CKEditor5.list.TodoList,
window.CKEditor5.mediaEmbed.MediaEmbed,
window.CKEditor5.paragraph.Paragraph,
window.CKEditor5.pasteFromOffice.PasteFromOffice,
window.CKEditor5.removeFormat.RemoveFormat,
window.CKEditor5.specialCharacters.SpecialCharacters,
window.CKEditor5.specialCharacters.SpecialCharactersEssentials,
window.CKEditor5.table.Table,
window.CKEditor5.table.TableToolbar,
window.CKEditor5.table.TableProperties,
Expand All @@ -198,19 +212,40 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
window.CKEditor5.wordCount.WordCount,
StrapiMediaLib
],
toolbar: [
toolbar: {
items: [
'heading',
{
label: 'Fonts',
withText: true,
items: [ 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor' ]
},
'bold', 'italic', 'underline',
{
label: 'More basic styles',
icon: 'threeVerticalDots',
items: [ 'strikethrough', 'superscript', 'subscript', 'code', 'removeFormat' ]
},
'|',
'bold', 'italic', 'link', 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'removeFormat',
'|',
'bulletedList', 'numberedList',
'link', 'strapiMediaLib', 'mediaEmbed', 'insertTable',
{
label: 'More media',
icon: 'threeVerticalDots',
items: [ 'horizontalLine', 'blockQuote', 'codeBlock', 'htmlEmbed', 'specialCharacters', 'highlight' ]
},
'|',
'outdent', 'indent', 'alignment',
'|',
'strapiMediaLib', 'mediaEmbed', 'blockQuote', 'insertTable', 'horizontalLine', 'codeBlock', 'htmlEmbed',
'alignment',
{
label: 'Lists',
withText: true,
items: [ 'bulletedList', 'numberedList', 'todoList', 'outdent', 'indent' ]
},
'findAndReplace',
'|',
'undo', 'redo'
],
],
shouldNotGroupWhenFull: true
},
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
Expand All @@ -220,6 +255,13 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = {
{ model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
]
},
list: {
properties: {
styles: true,
startIndex: true,
reversed: true
}
},
image: {
resizeUnit: "%",
resizeOptions: [ {
Expand Down