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

106
Views
Where data for auto-create caret tag in designMode/contenteditable

I have created tag b and am typing characters in it.
I then remove characters with backspace.
The tag b disappears from the DOM tree.
Then I press any character and the tag b reappears.

Question: where is the information that a tag will appear when a key is pressed?

UPD: minimal reproducible example:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>doc</title>
</head>
<body>
<pre style='font-family: "Times";'>
    <div class="editor">Delete and create <b>Blod</b></div>
    <div class="editor">Delete and create <b>Blod</b><div>After element.</div></div>
</pre>
<script>
    document.designMode = "on";
    document.body.spellcheck = false;
</script>
</body>
</html>

You need to look at the DOM tree. I also noticed an inadequate reaction if there is an element next.

Sreenshots example

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!