Rich Text and carriage return/line feed

R

Rick

I have a large block of text that I am putting in a rich text field. I am
trying to force carriage return/line feeds at specific locations within the
text that the field is bound to. I've tried passing in \r\n but that doesn't
work. I've tried embedding <br /> and <div> tags but those are ignored and
displayed as part of the text in the field.

Are there any characters/codes that I can embed in the text of the xml node
that will cause a line feed in the rich text field?
 
D

David Dean

In a rich text field, the formatting tags have to be inserted as XHTML
elements. If you try to use a rule to set the field value, you will get only
the textual content from the rule expression - any special characters are
replaced with XML entities (i.e. <br/> becomes <br/>).

However, you can modify a rich text element in form code by setting the
InnerXml property of the node to a string containing the XHTML text. This
will keep the formatting tags intact.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top