Iva*_*her 12 javascript ace-editor
有没有办法在使用ace编辑器时删除行号?
与删除打印边距类似,如下所示?
editor.setShowPrintMargin(false);
Run Code Online (Sandbox Code Playgroud)
epa*_*llo 22
使用
editor.renderer.setShowGutter(true/false);
http://ace.c9.io/#VirtualRenderer.setShowGutter=&nav=api&api=virtual_renderer
编辑选项 https://github.com/ajaxorg/ace/wiki/Configuring-Ace
Lar*_*eth 22
如果要隐藏行号但保留折叠小部件的装订线:
editor.renderer.setOption('showLineNumbers', false);
Run Code Online (Sandbox Code Playgroud)
更新版本 1.4.7 的答案。您可以像这样为 ace 编辑器设置多个选项,包括showGutter
this.editor.getEditor().setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: true,
showGutter: false,
maxLines: 20
});
Run Code Online (Sandbox Code Playgroud)