Support for both htmlBody and original body

This commit is contained in:
okbel
2018-02-21 16:37:19 -03:00
parent 9cfa5b6a0f
commit bf1bae8999
11 changed files with 216 additions and 16 deletions
@@ -16,7 +16,11 @@ class Editor extends React.Component {
init({
element: this.ref,
onChange: html => onChange(html),
onChange: htmlBody => {
// We want to save the original comment body
const originalBody = this.ref.childNodes[1].innerText;
onChange(originalBody, { htmlBody });
},
actions,
classes: {
actionbar: cn(