@surmon-china
I'm following the official Angular instructions to set up server side rendering using Angular Universal.
However, during the compilation process, an error is thrown:
elem.classList.toggle('test-class', false);
TypeError: Cannot read property 'toggle' of undefined
at Object.DIFF_DELETE (
This is coming from the underlying quill.js module, specifically this part in the dist/quill.js file:
var elem = document.createElement('div');
elem.classList.toggle('test-class', false);
if (elem.classList.contains('test-class')) {
var _toggle = DOMTokenList.prototype.toggle;
DOMTokenList.prototype.toggle = function (token, force) {
if (arguments.length > 1 && !this.contains(token) === !force) {
return force;
} else {
return _toggle.call(this, token);
}
};
}
The document object is not available on the server - would it be possible to design a workaround for this scenario (as this will be an invaluable addition to the library). Happy to help in any way.
@surmon-china I'm following the official Angular instructions to set up server side rendering using Angular Universal.
However, during the compilation process, an error is thrown:
This is coming from the underlying quill.js module, specifically this part in the
dist/quill.js
file:The
document
object is not available on the server - would it be possible to design a workaround for this scenario (as this will be an invaluable addition to the library). Happy to help in any way.Some ideas here: https://github.com/KillerCodeMonkey/ngx-quill/issues/91, https://github.com/KillerCodeMonkey/ngx-quill/issues/57