如何在Ace Editor中格式化XML代码? [英] How to format XML code in Ace Editor?
本文介绍了如何在Ace Editor中格式化XML代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用ACE Editor在我的网页上显示xml内容。我想在编辑器中格式化xml代码。
I am using ACE Editor to display xml content on my web page. I want to format the xml code in Editor.
有人可以告诉我该怎么做吗?
Can Any one tell me how to do this ?
推荐答案
程序包中包含许多模式,并且github上的 Wiki 会告诉您如何实施。像这样:
There are numerous modes included in the package and the Wiki at github will tell you how to implement it. Something like this:
var Mode = require('ace/mode/xml').Mode;
editor.getSession().setMode(new Mode());
这篇关于如何在Ace Editor中格式化XML代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文