Search options: separate word search diacritics
Research / Quill /

Quill saving to DB

https://github.com/quilljs/quill/issues/2276

h2

Some text

h3

In case anyone comes across this and finds this useful. You don't need to use innerHTML to render the delta, you can instantiate a new quill object with the settings of readonly and no toolbar, use CSS to remove the border if you want.

const quill = newQuill('#renderDiv', {
modules: {
toolbar: false
      },
readOnly: true
  });
// render the content
quill.setContents($delta)

To save the delta in the database I use JSON.stringify($delta) like above, with a listener that updates a hidden input

   quill.on('text-change', function(delta, oldDelta, source) 
   {
let deltaData = JSON.stringify(quill.getContents());
document.getElementById('#deltaDataDiv').value = deltaData;
   });