strange behavior of html tags inside contenteditable div
问题 In my project, I am trying to add HTML tag letter ( < and > ) dynamically to a contenteditable div. Whenever user is pressing alphanumeric character, I am appending an empty span element which is used for calculating the position of the caret in contenteditable div. The problem is that when I type some words like following: when < and press a alphanumeric character like b (which calls a function to append a span element), The contenteditable div is showing just when instead of when <b . When