Skip to content
Ryan Riffle edited this page Jan 15, 2016 · 1 revision

Poe is a word processor built with web technologies in an effort to create a word processor that is up to par with Google Docs. It does not use execCommand since that generates different markup on every browser which would create too many problems when it comes to serializing and deserializing the document.

In a broad overview, the main parts of the editor are: Writer, Document, TextBuffer, TextBufferMarker and InputHandler. Writer is the base that holds a document and helps initialize the application. Document is the actual document which stores each page in the DOM and handles it's data in the form of a TextBuffer. The TextBuffer stores all pertinent data the document contains and is edited using a TextBufferMarker. It stores each individual character as a text node along with the TextBufferMarkers in a flat array. The InputHandler gets user keystrokes and uses Caret which is a TextBufferMarker to insert text when the user types it. It also initiates text selection using the Caret to store the selection information.

Clone this wiki locally