如何获取所有选定(突出显示)的单词在ace编辑器中的位置
我正在使用ui- ace (ace编辑器的角度模块),当我尝试使用getSelection API获取所有选中文本的位置时,它只返回最后选中的元素位置。
我使用的是下面的API
editor.getSelectionRange()查看HTML是
<pre ui-ace="{ useWrapMode : true,
showGutter: false,
theme: 'textmate',
onLoad: aceLoaded,
onBlur: aceBlur}" ng-model="configVm.config"
style="height: 250px" >是否有API来获取所有选定的单词位置?
发布于 2017-01-26 02:29:28
您可以在ace上使用editor.selection.getAllRanges() (但不确定如何从angular-ui包装器中获取ace编辑器实例
https://stackoverflow.com/questions/41855944
复制相似问题