Prevent removing unnecessary white spaces in Kendo Editor

旧时模样 提交于 2019-12-14 03:22:25

问题


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

Print screen with edited text - wrong behaviour.

Thank you guys.


回答1:


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.



来源:https://stackoverflow.com/questions/24039884/prevent-removing-unnecessary-white-spaces-in-kendo-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!