206 karma · joined September 1, 2012
The editor keeps track of the original text and the modified text (not yet accepted text). The rendering starts by calculating the diff between the two texts and building a virtual DOM tree with special markers for changes. Then, cursors and selections are inserted into the virtual DOM, after which the DOM is processed by the markdown parser. The parser converts markdown syntax into formatted DOM elements. Finally, the virtual DOM is diffed against the contenteditable DOM, and the minimal updates are applied. There is some additional logic to handle cursor positioning between the updates and to manage the history.
Can you show us how you read the content of the file. Just want to learn more
Currently I am planing a SaaS Newsletter Mailer.