Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/448.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript CoffeeScript:Github ATOM,ATOM API的getSelection替代方案?_Javascript_Coffeescript_Atom Editor - Fatal编程技术网

Javascript CoffeeScript:Github ATOM,ATOM API的getSelection替代方案?

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()

如果要获取用户在网页上的选择,可以在js文件中使用window.getSelection()

我无法为github的atom找到类似的方法。(在API或coffeescript中)

我能用什么?

我知道了。 我们可以使用: selection=editor.getSelection() text=selection.getText()