@adan
To read in existing data into quill.js, you can follow these steps:
1 2 3 |
var quill = new Quill('#editor', { theme: 'snow' }); |
1 2 |
var existingData = "<p>This is some existing data</p>"; quill.root.innerHTML = existingData; |
1 2 3 4 5 6 7 |
var existingDelta = { ops: [ { insert: 'This is some existing data ' } ] }; quill.setContents(existingDelta); |
By following these steps, you can easily read in existing data into Quill.js and display it within the editor.