Javascript CoffeeScript:Github ATOM,ATOM API的getSelection替代方案?
如果要获取用户在网页上的选择,可以在js文件中使用window.getSelection() 我无法为github的atom找到类似的方法。(在API或coffeescript中) 我能用什么?我知道了。 我们可以使用: selection=editor.getSelection() text=selection.getText()Javascript CoffeeScript:Github ATOM,ATOM API的getSelection替代方案?,javascript,coffeescript,atom-editor,Javascript,Coffeescript,Atom Editor,如果要获取用户在网页上的选择,可以在js文件中使用window.getSelection() 我无法为github的atom找到类似的方法。(在API或coffeescript中) 我能用什么?我知道了。 我们可以使用: selection=editor.getSelection() text=selection.getText()