Design an Extensible Text Editor
Model an in-memory text editor whose content can be changed and rendered through pluggable output formats.
For this exercise, assume one in-memory document stores Unicode text. A caller can append text, remove a requested half-open character range, and render the complete current snapshot as binary, Morse, or HTML output. An invalid range is rejected without changing the document.
Rendering never mutates editor state, and a new output format should be addable without changing the editor's core mutation workflow. A renderer may reject text it cannot represent, and that failure must also leave the document unchanged. Design the object model, public contracts, and collaborations for this editor.
Exclude persistence, rich-text styling, collaborative editing, cursors, search, and network delivery.