strapi-plugin-ckeditor5
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -38,3 +38,3 @@ import React from 'react'; | ||
const Editor = ({ onChange, name, value, setEditor, config }) => { | ||
const Editor = ({ onChange, name, value, config }) => { | ||
return ( | ||
@@ -46,3 +46,2 @@ <Wrapper> | ||
onReady={editor => { | ||
setEditor(editor); | ||
if (value) { | ||
@@ -49,0 +48,0 @@ editor.setData(value); |
@@ -20,3 +20,8 @@ import React, { useState } from 'react'; | ||
const [editor, setEditor] = useState(null); | ||
const toggleMediaLib = (data) => setIsOpen(prev => !prev); | ||
const toggleMediaLib = (editor) => { | ||
if (editor) { | ||
setEditor(editor); | ||
} | ||
setIsOpen(prev => !prev) | ||
}; | ||
let spacer = !isEmpty(inputDescription) ? <div style={{ height: '.4rem' }} /> : <div />; | ||
@@ -69,6 +74,6 @@ | ||
<Label htmlFor={name} message={label} style={{ marginBottom: 10 }} /> | ||
<Editor name={name} onChange={onChange} value={value} setEditor={setEditor} config={config} /> | ||
<Editor name={name} onChange={onChange} value={value} config={config} /> | ||
<InputDescription message={inputDescription} style={!isEmpty(inputDescription) ? { marginTop: '1.4rem' } : {}} /> | ||
<InputErrors errors={(!noErrorsDescription && errors) || []} name={name} /> | ||
<MediaLib onToggle={toggleMediaLib} isOpen={isOpen} onChange={onImageSelected} /> | ||
<MediaLib isOpen={isOpen} onToggle={toggleMediaLib} onChange={onImageSelected} /> | ||
</div> | ||
@@ -75,0 +80,0 @@ ); |
@@ -15,2 +15,3 @@ module.exports = ({ | ||
// 'underline', | ||
// 'code', | ||
// 'link', | ||
@@ -36,3 +37,3 @@ // 'bulletedList', | ||
// 'undo', | ||
// 'redo' | ||
// 'redo', | ||
// ], | ||
@@ -45,3 +46,3 @@ // shouldNotGroupWhenFull: true | ||
// 'alignCenter', | ||
// 'alignRight' | ||
// 'alignRight', | ||
// ], | ||
@@ -76,3 +77,3 @@ // resizeOptions: [ | ||
// '|', | ||
// 'linkImage' | ||
// 'linkImage', | ||
// ] | ||
@@ -84,3 +85,5 @@ }, | ||
// 'tableRow', | ||
// 'mergeTableCells' | ||
// 'mergeTableCells', | ||
// 'tableProperties', | ||
// 'tableCellProperties', | ||
// ] | ||
@@ -94,3 +97,3 @@ }, | ||
// { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' }, | ||
// { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' } | ||
// { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' }, | ||
// ] | ||
@@ -97,0 +100,0 @@ }, |
{ | ||
"name": "strapi-plugin-ckeditor5", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Replace Strapi default WYSIWYG editor with enhanced build of CKEditor 5", | ||
@@ -38,3 +38,3 @@ "private": false, | ||
"@ckeditor/ckeditor5-react": "^3.0.1", | ||
"ckeditor5-build-strapi-wysiwyg": "^1.6.0" | ||
"ckeditor5-build-strapi-wysiwyg": "^1.7.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16813
424