I am trying to use the 3rd party rich text editor Quill but it seems no implementation will work. After instantiating Quill on one of our elements the editor loads up and looks correct. However, as soon as you start typing there are errors galore.

The biggest issue seems to come from document.getSelection() to let Quill know what is selected. Upon much debugging, document.getSelection() gets proxied and removes the necessary nodes to read but WHY?! Upon inspecting the nodes they are all in the same Secure namespace but still, the object returned has a stripped down version of the actual object that should be returned.

Can someone please help me understand why this is happening and how to potentially fix this?

  • quilljs doenst seem to be supported by locker service locker service supported libraries – glls Aug 18 '17 at 13:55
  • @jspan, did you manage to find a solution to this? I'm struggling with using Quill in Lightning as well. – CMacErlich Aug 28 '17 at 3:06

To further expand on my comment above, assuming you are are referring to Quilljs,

This is specified in a post by @crmprogdev :

Important: Libraries that do not support strict mode will not work with LockerService enabled.

Which external JS libs work with Lightning Locker Service?

If you take a quick look at a Security Audit for Quill

notice that Strict mode is a missing security feature in the library, thus, not supported with locker service enabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.