Datatables Editor: Quill Editor throwing up an error when plugin passes null value

Datatables Editor: Quill Editor throwing up an error when plugin passes null value

theAnimalixtheAnimalix Posts: 35Questions: 12Answers: 2
edited April 2016 in Free community support

Hey,

I'm using Quill editor with Datatables Editor plugin and when the inputs are empty I get an error since null is passed via conf._quill.setHTML( val );

As a quick fix I've changed my code to check for null values there and pass an empty string in that case (seems to fix the problem).

Can anyone confirm the problem or it could be something on my side instead?

Answers

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin

    Hi,

    Just to confirm, the data for the cell is null and that is what is being passed into Quill and it is subsequently throwing an error? Perhaps the plug-in should do:

    conf._quill.setHTML( val !== null ? val : '' );
    

    I don't see any harm in doing that. If you could confirm that is the case I'll update the plug-in.

    Thanks,
    Allan

  • theAnimalixtheAnimalix Posts: 35Questions: 12Answers: 2

    Thanks for confirming that. I've done exactly that and it seems like it's working perfect.

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    edited April 2016

    Thanks for the confirmation. That change will be in the next update.

    Regards,
    Allan

This discussion has been closed.