2

I am using quill as a text editor. Quill Editor

I need to get the data from the editor to send to server in a ajax call.

I am using getContent() function but it is returning a delta object?

How do I get the data in the parsed form?

Zakaria Acharki
  • 66,747
  • 15
  • 75
  • 101
sam23
  • 589
  • 2
  • 7
  • 23
  • [See this answer](https://stackoverflow.com/a/44509082/3585500) if you want the raw html. But also read the [linked issue discussion](https://github.com/quilljs/quill/issues/87). – ourmandave Jun 21 '17 at 02:10

2 Answers2

2

Just in case someone face the same problem. The data in html can be retrive using

html = editor.root.innerHTML;

A link to working code and other method here

sam23
  • 589
  • 2
  • 7
  • 23
0

I use this to get the content

<div id="editor-container"></div>

let quill = new Quill('#editor-container');

let content = quill.editor.scroll.domNode.innerHTML;
hassanrazadev
  • 626
  • 9
  • 15