Rev 7120 | Rev 9879 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'
import { CKEditor } from "ckeditor4-react";
const DescriptionInput = ({ name, setValue, defaultValue }) => {
return (
<CKEditor
data={name}
onChange={(e) => {
const text = e.editor.getData();
setValue(name, text);
}}
onInstanceReady={(e) => defaultValue && e.editor.setData(defaultValue)}
config={{
toolbar: [
{ name: 'editing', items: ['Scayt'] },
{ name: 'links', items: ['Link', 'Unlink'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
'/',
{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
{ name: 'styles', items: ['Styles', 'Format'] },
{ name: 'tools', items: ['Maximize'] }
],
removePlugins: 'elementspath,Anchor',
heigth: 100
}}
name={name}
/>
)
}
export default DescriptionInput