Thank you for getting back to me.
I would like to assure you that there is no built-in filter, the logic of which is to strip the last
. In the provided demo project I created initial content with such element. On my end nothing is being removed after a post back neither on switching from design to HTML view.
In the provided snapshot I assume that you are using the space key, which appends a space character, which could be represented as a string value like that " " and not an
. If this is the case I would point out that the encounter behavior is related to the browsers' implementations and not the RadEditor
As a conclusion I could suggest you the following approaches:
- Building a custom content filter that reads the HTML content of the editor and replaces the last white space with an entity, if one exists.
- Building a custom logic that wraps the whole text with a block element e.g. <div>, so that the white space will be preserved.
- Override the keyboard event of the editor's content with function that inserts an rather than white space character when the space key is pressed. You could follow this forum post, in which an example for this approach is provided.
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed