Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
What alternative can be used for ExecCommand on ContentEditable?

So, I am trying to build a WYSIWYG editor and using execCommand("bold"), execCommand("italic") etc. While they work properly, the Docs says execCommand is deprecated and might start to not work anymore. However, it doesn't say what to use instead of it. Is there any alternative ?

I have tried:

window.dispatchEvent(
   new KeyboardEvent("keydown",{ctrlKey: true, code: "KeyB", keyCode: 66})
);

But, unfortunately, it doesn't affect elements with contenteditable attribute.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!