如果你想获取用户在网页上的选择,你可以在js文件中使用window.getSelection()。
我无法为github的atom找到类似的方法。 (在他们的API或coffeescript中的东西)。
我可以使用什么?
最佳答案
我明白了。 我们可以用: 选择=editor.getSelection() 文本=selection.getText()
关于javascript - CoffeeScript:Github ATOM,Atom API 的 getSelection 替代品?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24910778/