How can I get document.execCommand to work in browsers other than chrome? If I canā€™t, what are the alternatives? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How can I get document.execCommand to work in browsers other than chrome? If I canā€™t, what are the alternatives?

https://code.sololearn.com/W8iBH8BAhwct/?ref=app Iā€™m creating a text editor and using document.execCommand to generate and modify HTML. Unfortunately this doesnā€™t seem to be available in browsers like IE and Firefox. Iā€™ve searched for alternatives or solutions to this problem but havenā€™t had any luck. If someone has a solution or alternative to share that would be very much appreciated.

7th Dec 2018, 7:40 AM
Thomas Czernek
Thomas Czernek - avatar
1 Resposta
+ 1
It is supposed to be (partially) supported by major browsers, according to this page on MDN (Mozilla Developers Network): https://developer.mozilla.org/en-US/docs/Web/API/document/execCommand Check it, and make sure to use it the right way and only for/with command widely supported ;)
7th Dec 2018, 9:09 AM
visph
visph - avatar