[FX.php List] Keeping text formatting from a FM field

Joel Shapiro jsfmp at earthlink.net
Tue May 27 18:31:47 MDT 2008


Hi Bob

Look into the "GetAsCSS()" FMP function to see if that can help you.

-Joel


On May 27, 2008, at 5:24 PM, Tim 'Webko' Booth wrote:

>
> On 28/05/2008, at 10:12 AM, Bob Patin wrote:
>
>> I'm trying to display text just as the client entered it, but when  
>> I try nl2br() I get the carriage returns and not the bolding.
>>
>> Then I tried htmlentities(nl2br()) but that didn't work, and in  
>> fact removed the carriage returns.
>>
>> I searched my emails but couldn't find the solution; how do I do  
>> this?
>
> I don't think you can... The contents of a field, when you look in  
> the array, contain no stylistic elements, regardless of what is  
> applied to the field. They do contain any returns that were part of  
> the field contents.
>
> You'd need to add html markup to the field that can then be  
> interpreted back as part of the field to the web.
>
> Mind you, if anyone can think of a way to do this, it would be very  
> useful...
>
> Of course, if the initial information is being entered via the web,  
> you can use something like fckEditor to add the markup at the point  
> of data entry.
>
> Cheers
>
> webko
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list