Preserving Whitespace in Kendo UI for Angular Editor
Environment
Product | Progress® Kendo UI® for Angular Editor |
Description
The Kendo UI for Angular Editor automatically removes extra spaces in text content. These spaces are crucial for preserving a specific text alignment or format. Is there a way to prevent the Editor from trimming these spaces?
This article also answers the following questions:
- What method allows for the preservation of extra spaces in the Angular Editor?
- Can whitespace be preserved in the Kendo UI for Angular Editor?
Solution
To prevent the Kendo UI for Angular Editor from removing extra spaces in the text content, replace the spaces you want to preserve with the HTML entity
. The Editor trims empty spaces by default, and using
is the recommended method to maintain whitespace where needed.
Here's an example of how to use
in your content:
<p>This is a test.</p>
In the example above, each
represents a space that will be preserved by the Editor, allowing for precise control over text formatting and alignment.