2015-09-27 71 views

回答

8

您可以通过使用

editor.renderer.$cursorLayer.element.style.display = "none" 
+3

为了提高我想补充一点的UI: editor.setOptions({ readOnly的:真实, highlightActiveLine:假的, highlightGutterLine:假 }) – daronwolff

+0

@daronwolff那是一种替代方法?如果是这样,你可以把它作为一个单独的答案发布 –

3

这里是参考答案做,视觉对比隐藏cursorLayer:

下面是它看起来像以前一样:

enter image description here

中加入:

editor.setOptions({readOnly: true, highlightActiveLine: false, highlightGutterLine: false}); 

如由 “用户” 建议的,消除了沟槽和线突出,但光标仍然存在:

enter image description here

然后加入行:

editor.renderer.$cursorLayer.element.style.display = "none" 

如“daronwolff”所示,移除光标:

enter image description here

相关问题