[英]Preserve indentation when setting value of Ace editor
How can you preserve the indentation of a string that is push into Ace editor by .setValue()
? 如何保留由
.setValue()
推送到Ace编辑器中的字符串的缩进? Now, when I push a string into the editor, all the indentation is lost and it has this weird typewriter spacing: assuming the typewriter is |
现在,当我将字符串推入编辑器时,所有的缩进都会丢失,并且它具有奇怪的打字机间距:假定打字机是
|
if 如果
string to edit here with four space-> |
if I press backspace,: 如果按退格键:
string to edit here with four space- |
I dont know why this happen, please help 我不知道为什么会这样,请帮忙
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.