Jump to content

text format

This topic is 8585 days old. Please don't post here. Open a new topic instead.

Recommended Posts


When i publish in cdml some field I can't keep the text format that I have in my db, like one paragraph and then another.

all the text is one line after another line of text.

is there a solution ?



Philippe Waterloos


Link to comment
Share on other sites

It's an all-or-nothing thing... yes you can embed html in the field and use the [FMP-Field: name, HTML] option to get web companion to render it. But if you do this you'll have to use <p> or <br> tags to get the line and paragraph breaks.

Link to comment
Share on other sites


Originally posted by philwatr:

Thanks a lot, it works

do you know if it is possible to keep the bold text as bold text.

I try to put a <b> tag like I do in sql

but it doesn't work.

thanks again

If you use the RAW and you run the field through calculation field for line breaks conversion, you will get the best:

Line breaks AND HTML tags.

I am using that often

Link to comment
Share on other sites

In your html format file, there is a cdml element for each field. The code will be of the form [FMP-Field: fieldname, encoding] where "encoding" can be either raw, url, html or break. HTML is the default.

The encoding option instructs Web Companion how to process or display the contents of the field.

The default html option makes web companion encode the text into html, converting special characters like <>& into their html equivilents so they will display as intended on the web page but in doing so all carriage returns and FMP formatting are lost. (To put it another way, whatever *character* you type in the text field in FMP will appear in the web page, but formatting including returns are lost.) Formatting for the field is usually done on the html format file.

The break option keeps line breaks and carriage returns but formatting is similarly lost.

The raw option instructs web companion not to process the field contents in any way. This option is used when you have html embedded in your text field.

The url option is used when the text field is part of a url -- web companion will change characetrs into their url equivilents eg., space is %20.

Link to comment
Share on other sites

For additional information look in your CDML Reference. You will note some tags which have a subheading titled "Parameter(s)" which discusses the encoding which is available, and also which parameter is used as default which, if appropriate, means you do not have to use the encoding in your tag.


Keith M. Davie

Link to comment
Share on other sites

This topic is 8585 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.