Commit fb694d4e by Рамис

new editor

parent e3df4775
{
"name": "react-ag-qeditor",
"version": "1.0.1",
"version": "1.0.2",
"description": "WYSIWYG html editor",
"author": "atma",
"license": "MIT",
......
......@@ -23,7 +23,7 @@ import Iframe from './extensions/Iframe'
const initialBubbleItems = ['bold', 'italic', 'underline', 'strike'];
const QEditor = ({ value, onChange, style, uploadOptions }) => {
const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions }) => {
const [innerModalType, setInnerModalType] = useState(null);
const [embedContent, setEmbedContent] = useState('');
const [uploaderUid, setUploaderUid] = useState('uid' + new Date());
......@@ -223,9 +223,7 @@ const QEditor = ({ value, onChange, style, uploadOptions }) => {
})
],
content: value,
onUpdate: ({editor}) => {
console.log(editor.getHTML());
}
onUpdate: ({editor}) => onChange(editor.getHTML())
})
const buildActionsModal = (buttons = []) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment