TextRange () { TextRange range = myDelegate.getSelectionRange(); return TextRange.create(myEditorWindow.getDocument().hostToInjected(range.getStartOffset()), myEditorWindow.getDocument().hostToInjected(range.getEndOffset())); }