6 html javascript editor ace-editor
我在HTML上使用ACE编辑器,我在我的网站上设计了一个自定义模式来突出显示语法,认为语法识别和突出显示一切都很好,我无法找到显示白色空格和制表空间的方法喜欢崇高的文字.
在搜索时,我知道我们可以使用
getNextLineIndent(state, line, tab) { }
作为检查每个新行中事件的计数器.
除了这个解决方案有没有任何默认或简单的选择?
小智 -6
终于想通了!
可以通过以下步骤显示空白(就像在 sublime text 中一样):
在第 14499 行,替换为以下代码
this.showInvisibles = true;
this.setShowInvisibles = function(showInvisibles)
{
if (this.showInvisibles == showInvisibles)
return true;
this.showInvisibles = showInvisibles;
this.$computeTabString();
return true;
};
Run Code Online (Sandbox Code Playgroud)