I am trying to set content like this:
quill.setContents("<div class='r'>some text</div> ");
But it does not work. Please help.
I am trying to set content like this:
quill.setContents("<div class='r'>some text</div> ");
But it does not work. Please help.
assigning it to the innerHTML usually works. try this quill.root.innerHTML = "<div class='r'>Some text</div>";
Using setText you can set HTML data
var quill = new Quill(".editor", {
modules: {
toolbar: toolbarOptions
},
theme: "snow"
});
quill.setText("<div class='r'>some text</div>");
Read more from quilljs document