WebExpress 2.0.0‑alpha – Why execCommand is Dead
The development of modern rich-text editors on the web has undergone a fundamental paradigm shift. The native browser API document.execCommand() is obsolete, generates inconsistent HTML, and prevents precise control over the document flow. Frameworks like Tiptap, ProseMirror, or Lexical demonstrate that the future lies in a strict separation of data and representation. WebExpress is now undergoing a complete migration from error-prone DOM manipulation to a deterministic, state-based approach combined with a modern, block-based layout system. The core of this new architecture is a central JavaScript object in JSON format that defines the document as a tree structure known as an Abstract Syntax Tree. A document consists of a root node whose children are either structural layout blocks or content-based text elements. Each node has a type, optional attributes like formatting, and an array of child nodes. A text section is declared as a paragraph node whose children in turn are text nodes w...