WPCubed Product Support

FastAddText

I've written some code to load a custom XML format into a TWPRichText editor. this code is working well, with one exception.

Prior to loading any text, i call the ClearBody method to clear out the TWPRichText control.

I then have a loop which adds paragraphs via the FastAddText() method. This works, but for some reason each time i load the text, i get a blank line as the first line in the control. What could possibly be causing this? Is there a better method to clear out the TWPRichText?

alan

#1 ♥ 0
2.4k Views 2 users read 1 min
support

Hi,

Instead of WPRichText.ClearBody which creates a first paragraph You can use

WPRichText.BodyText.Clear(false) to clear the body and not create a new empty paragraph.

Regards,

Julian

#2 ♥ 0
This category is archived. No new posts are possible.