Commit fb694d4e by Рамис

new editor

parent e3df4775
{ {
"name": "react-ag-qeditor", "name": "react-ag-qeditor",
"version": "1.0.1", "version": "1.0.2",
"description": "WYSIWYG html editor", "description": "WYSIWYG html editor",
"author": "atma", "author": "atma",
"license": "MIT", "license": "MIT",
......
...@@ -23,7 +23,7 @@ import Iframe from './extensions/Iframe' ...@@ -23,7 +23,7 @@ import Iframe from './extensions/Iframe'
const initialBubbleItems = ['bold', 'italic', 'underline', 'strike']; const initialBubbleItems = ['bold', 'italic', 'underline', 'strike'];
const QEditor = ({ value, onChange, style, uploadOptions }) => { const QEditor = ({ value, onChange = ()=>{}, style, uploadOptions }) => {
const [innerModalType, setInnerModalType] = useState(null); const [innerModalType, setInnerModalType] = useState(null);
const [embedContent, setEmbedContent] = useState(''); const [embedContent, setEmbedContent] = useState('');
const [uploaderUid, setUploaderUid] = useState('uid' + new Date()); const [uploaderUid, setUploaderUid] = useState('uid' + new Date());
...@@ -223,9 +223,7 @@ const QEditor = ({ value, onChange, style, uploadOptions }) => { ...@@ -223,9 +223,7 @@ const QEditor = ({ value, onChange, style, uploadOptions }) => {
}) })
], ],
content: value, content: value,
onUpdate: ({editor}) => { onUpdate: ({editor}) => onChange(editor.getHTML())
console.log(editor.getHTML());
}
}) })
const buildActionsModal = (buttons = []) => { 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