update the example to use a string for addToEditor