Welcome to the JavaScript feedback portal. We’re happy you’re here! If you have feedback on how to improve the JavaScript, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Hi,
If set the cssClass property on the rich text editor to have more than one class (using a space separator) you get an error with the link insert popup when it closes.
To demonstrate the issue I've cloned your link example from the documentation and set two css classes via cssClass (i.e. two class names with a space separator as the string value).
https://stackblitz.com/edit/yfihl4?file=index.ts
So when you turn a piece of text into a link and click on "Insert" on the link popup you then get an error of:
"Failed to execute 'remove' on 'DOMTokenList': The token provided ('class1 class2') contains HTML space characters, which are not valid in tokens."
Looking at the stack trace this comes from when code in actions/base-quick-toolbar.js does the following:
if (this.popupObj && this.parent.cssClass) {removeClass([this.popupObj.element], this.parent.cssClass);
addClass([this.popupObj.element], this.parent.cssClass);
}
removeClass([this.popupObj.element], this.parent.cssClass.split(' '));Note that the documentation for the cssClass property for the rich text editor says: