Markers not appearing in editor


I’m having a hard time figuring out why the markers I’m adding to an editor instance aren’t being added to the DOM. The code in question is here. A request is made to a locally running server, which returns a JSON-serialized list of start and end offsets. The plugin is supposed to create markers from those offsets and decorate them with the .innuendo .identifier CSS class whenever the user holds down the Cmd (or Ctrl) key. When triggered, the highlighting code does not add any elements or CSS classes to the DOM, so nothing happens visually in the editor. Any help would be most welcome!


Ok, I figured out what went wrong here. I needed to pass an array to markBufferRange instead of two arrays. In other words, I needed editor.markBufferRange([startPoint.toArray(), endPoint.toArray()]) instead of editor.markBufferRange(startPoint.toArray(), endPoint.toArray());. Simple mistake!