Search code examples
javascripthtmlwebkendo-uikendo-editor

Prevent removing unnecessary white spaces in Kendo 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 enter image description here

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

Thank you guys.


Solution

  • 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.