diff --git a/admin/src/components/CKEditorInput/Configurator.js b/admin/src/components/CKEditorInput/Configurator.js index 462e652..af472ee 100644 --- a/admin/src/components/CKEditorInput/Configurator.js +++ b/admin/src/components/CKEditorInput/Configurator.js @@ -51,7 +51,9 @@ const { TableColumnResize, TableCaption, WordCount, - Highlight + Highlight, + SourceEditing, + GeneralHtmlSupport } = window.CKEDITOR; const CKEDITOR_BASE_CONFIG_FOR_PRESETS = { @@ -77,7 +79,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = { TableColumnResize, TableCaption, WordCount, - StrapiMediaLib + StrapiMediaLib, + SourceEditing, + GeneralHtmlSupport ], toolbar: [ 'undo', 'redo', @@ -88,7 +92,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = { '|', 'link', 'strapiMediaLib', 'insertTable', '|', - 'bulletedList', 'numberedList' + 'bulletedList', 'numberedList', + '|', + 'sourceEditing', ], heading: { options: [ @@ -158,7 +164,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = { TableColumnResize, TableCaption, WordCount, - StrapiMediaLib + StrapiMediaLib, + SourceEditing, + GeneralHtmlSupport ], toolbar: [ 'undo', 'redo', @@ -169,7 +177,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = { '|', 'link', 'strapiMediaLib', 'mediaEmbed', 'blockQuote', 'insertTable', 'codeBlock', '|', - 'bulletedList', 'numberedList', 'outdent', 'indent' + 'bulletedList', 'numberedList', 'outdent', 'indent', + '|', + 'sourceEditing', ], heading: { options: [ @@ -264,7 +274,9 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = { TableCaption, WordCount, Highlight, - StrapiMediaLib + StrapiMediaLib, + SourceEditing, + GeneralHtmlSupport ], toolbar: { items: [ @@ -283,6 +295,8 @@ const CKEDITOR_BASE_CONFIG_FOR_PRESETS = { 'alignment', '|', 'bulletedList', 'numberedList', 'todoList', 'outdent', 'indent', + '|', + 'sourceEditing', ], shouldNotGroupWhenFull: true }, diff --git a/admin/src/components/CKEditorInput/index.jsx b/admin/src/components/CKEditorInput/index.jsx index aa5b8d0..98d0d9d 100644 --- a/admin/src/components/CKEditorInput/index.jsx +++ b/admin/src/components/CKEditorInput/index.jsx @@ -30,7 +30,6 @@ const CKEditorInput = ( props ) => { intlLabel } = props; const { onChange, value } = useField( name ); const [ editorInstance, setEditorInstance ] = useState(false); - const { formatMessage } = useIntl(); const { maxLengthCharacters:maxLength , ...options } = attribute.options; const configurator = new Configurator( { options, maxLength } ); const editorConfig = configurator.getEditorConfig(); @@ -64,13 +63,12 @@ const CKEditorInput = ( props ) => { - { intlLabel ? formatMessage( intlLabel ) : name } + { intlLabel ?? name } { const [ importedEditor, setImportedEditor ] = useState( null ); @@ -22,9 +24,9 @@ const CKEditorProvider = ( { disabled={ disabled } labelAction={ labelAction } required={ required } - description={ description } + description={ hint } error={ error } - intlLabel={ intlLabel } + intlLabel={ label } /> ); }; diff --git a/package.json b/package.json index e93f8c1..4bf7c18 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@ckeditor/strapi-plugin-ckeditor", + "name": "@kostaszazim/strapi-plugin-ckeditor", "version": "1.0.2", - "description": "CKEditor 5 - Official Integration for Strapi", + "description": "CKEditor 5 - Official Integration for Strapi, including label fixes and source editing", "strapi": { "name": "ckeditor", "description": "The rich text editor for every use case", @@ -30,7 +30,7 @@ "type": "git", "url": "https://github.com/ckeditor/strapi-plugin-ckeditor.git" }, - "author": "CKSource (http://cksource.com/)", + "author": "CKSource (http://cksource.com/), kostas_zazim@yahoo.gr", "homepage": "https://market.strapi.io/plugins/@ckeditor-strapi-plugin-ckeditor", "engines": { "npm": ">=6.0.0"