I’ve got ReactQuill working but, when I paste HTML into the editor it:
- doesn’t maintain the HTML, and
- doesn’t allow editing once it’s pasted
I found the following code but it didn’t help.
Any suggestions?
var Clipboard = ReactQuill.Quill.import('modules/clipboard');
var Delta = ReactQuill.Quill.import('delta');
class PlainClipboard extends Clipboard {
convert(html = null) {
if (typeof html === 'string') {
this.container.innerHTML = html;
}
return new Delta().insert(this.container.innerText);
}
}