由于语言(模式)失败,ng2-ace-editor不显示颜色并折叠

问题描述 投票:-2回答:1

我尝试使用适当的编辑体验来展示XML编辑器。我唯一期待的是正确的着色,褶皱和折叠。我使用了ng2-ace-editor lib。似乎由于语言选择失败着色和折叠在这里不起作用。


component.ts

this is the code in 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

xml typescript angular7 ace-editor xml-editor
1个回答
0
投票

https://github.com/fxmontigny/ng2-ace-editor自述文件中的代码示例中,您需要使用没有[mode]="'xml'"部分的ace/mode

© www.soinside.com 2019 - 2024. All rights reserved.