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!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ответ
+ 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