I had a look at the code and wondered how to retrieve the state of the editor, i.e. the codes, the boundaries as well as the text and its formatting.