New to Kendo UI for AngularStart a free 30-day trial

Preserving Whitespace in Kendo UI for Angular Editor

Environment

ProductProgress® 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:

html
<p>This&nbsp;&nbsp;&nbsp;is&nbsp;&nbsp;&nbsp;a&nbsp;&nbsp;&nbsp;test.</p>

In the example above, each &nbsp; represents a space that will be preserved by the Editor, allowing for precise control over text formatting and alignment.

See Also

In this article
EnvironmentDescriptionSolutionSee Also
Not finding the help you need?
Contact Support