joelcolucci / node-quill-converter

Convert HTML to a Quill Delta or a Quill Delta to HTML
MIT License
95 stars 25 forks source link

Fix for web compatibility #21

Open buu700 opened 3 years ago

buu700 commented 3 years ago

The diff is smaller with ?w=1, but basically just made it conditional whether to use JSDOM or browser DOM depending on the existence of document. eval('require')(...) is used in the Node.js case to avoid getting picked up by web bundlers.