In order to acomplish Safari integration and adding support for semantic tags like <address>, WYM needs to be able to replace selected text and insert code before/after the caret.
As jf.hovinne suggested at #12 insertAtCaret should be implemented in the core.
Other useful methods to implement might include
- hasContentSelected
- getSelectedContent
- replaceSelectedContent
- insertAtCaret
- deleteSelection
- moveCaretTo
- getCaretPosition
If this sounds OK, I will start adding this features at the New parser branch.