1
votes

The problem:

I have to use the Delta and Event features of Quill.js to provide some contextual dropdowns on specific keywords within the Gmail Composer (on gmail.com) in a chrome extension.

The problem is that the Gmail Composer already has a content editable element. When I apply Quill.js to it, I end up with another contenteditable element within the gmail composer element. With a simple backspace the Quill.js editor actually gets deleted and the functionality of quill is pretty much broken in many other ways.

I can't remove the Gmail Composer's editor because then I remove basic Gmail functions like Attachments, Links, Emoticons etc. On the other hand I have to use Quill.js to implement some features.

Example

Here is a simplified example: http://jsfiddle.net/vdaqrsrw/1/:

Quill.js added to an already contenteditable element

When initiating Quill on the #editor it creates the #ql-editor-1 element within the #editor element that already has contenteditable set - so now we have 2 contenteditable elements nested in each other that breaks the toolbar and general functionality of the editable area:

enter image description here

The Question

Is there a way to apply Quill.js to an already content editable area without the nesting problems? Are there any other ways to do it?

1

1 Answers

0
votes

No, Quill was designed and built to be a standalone editor.