API Driven Design
Rich text editors are built to help people write text. Yet surprisingly, most rich text editors have no idea what text the user composed. These editors see their content through the same lens a web developer does: the DOM. This presents an impedance mismatch since the DOM is made up of Nodes organized in an unbalanced tree, whereas text is made up of lines, words and characters.
There is no DOM API where characters is the unit of measure. With this limitation, most rich text editors cannot answer simple questions such as “What text is in this range?” or “Is the cursor on bolded text?” Trying to build rich editing experiences on top of such primitives is very difficult and frustrating.