防止在Kendo Editor中删除不必要的空格 [英] Prevent removing unnecessary white spaces in Kendo Editor

查看:88
本文介绍了防止在Kendo Editor中删除不必要的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Kendo Editor在内容中插入代码片段,并且效果很好,但是当我想更改此格式化的代码时,Editor删除了不必要的空格,但是在我的用例中,这是错误的. 你有什么想法可以解决吗?

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.

谢谢你们.

推荐答案

好的,我没有找到解决方案,但是我找到了解决方法-我正在通过

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

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

并且kendo剥去了不必要的空格,因此在服务器端,我只是用不间断空格替换空格,并用间断线替换换行...这不是干净的解决方案,而是可行的解决方法.

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.

这篇关于防止在Kendo Editor中删除不必要的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆