我尝试显示具有适当编辑经验的XML编辑器。我只希望正确的着色,缩进和折叠。我使用ng2-ace-editor lib。似乎由于语言选择失败而无法在此处进行着色和折叠。
component.ts
component.html
<ace-editor
[(text)]="xmlToView"
[options]="options"
[durationBeforeCallback]="1000"
[theme]="eclipse"
[mode]="'ace/mode/xml'">
结果
sasc This is the result I get. I want to show the folding as well as color
答案 0 :(得分:0)
根据https://github.com/fxmontigny/ng2-ace-editor自述文件中的代码示例,您需要使用[mode]="'xml'"
而不使用ace/mode
部分。