Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2007

Tip: Looking for answers? Try searching our database.

Rich Text and carriage return/line feed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 01 Aug 2007 00:16 GMT
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?
David Dean - 01 Aug 2007 02:46 GMT
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.

Signature

David Dean
Sr. Member Technical Staff
Insource Technology Corp.

> 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
[quoted text clipped - 4 lines]
> 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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.