Closed IoTMOD closed 3 years ago
It's true that MDN says document.execCommand is obsolete. However, there are no plans to remove it from browsers. Bandicoot relies very heavily on execCommand - removing it would require a rewrite of bandicoot.
I don't have any plans to rewrite bandicoot to not use execCommand - it would be a significant endeavor where almost 100% of the existing code would need to be thrown away. The size of the library would increase drastically, since bandicoot would have to do HTML manipulation itself instead of deferring that work to the browser.
I no longer work at Canopy, but still have helped maintain bandicoot since leaving. I still use bandicoot in my projects and it serves my needs - if you have different needs then I'd suggest not using it.
Hi there! The
useDocumentExecCommand
hook wraps the obsoletedocument.execCommand()
.E.g.: The
Change font
button shown in the example (https://bandicoot.js.org/hooks/use-document-exec-command.html) will create a<font>
tag, which is an obsolete tag. Is there a (build in) way to manipulate the font family in another (HTML5) way or is there a plan to add a hook to do so?