// This replaces the selection with the given text
 public void ReplaceSelection(string replacement)
 {
     editor.ReplaceSelection(replacement);
 }