Prevent removing unnecessary white spaces in Kendo

2019-09-06 09:24发布

I'm using Kendo Editor to insert code snippets to content and it works very well, but when I want to change this formatted code, editor removes unnecessary white spaces, but in my use-case it's wrong. Have you any idea hot wo fix it?

Print screen with new text in editor enter image description here

Print screen with edited text - wrong behaviour. enter image description here

Thank you guys.

1条回答
贼婆χ
2楼-- · 2019-09-06 09:34

Ok, I'm not found solution, but I found workaround - I'm inserting code into editor by

    <pre class="code">...</pre>

and kendo stripps unnecessary white spaces, so on server side I'm just replaceing white spaces by non-breaking spaces and new line by breakline... It's not clean solution, but working workaround.

查看更多
登录 后发表回答