« [Challenge] Week 1/10/05: Code challenge | Main | [Challenge] Week 1/10/05: Code challenge (answer) »

January 12, 2005

[Tip] Function "getAsPlainText" explained

by Dean Westover and David Workman

Recently I noticed an interesting forum thread that explains a little known (and quite useful) function: "getAsPlainText". Dean Westover has figured out this useful function and has explained it for us all in a flash movie which you can view here:

Demo Movie by Dean Westover

Several additional notes in my testing:

  • This function works to strip out html markup as well as rtf code. Just switch the field displays to html_area instead of rtf_area.
  • This function only shows up as a function in the object tree under the element branch when there is a named global field. Name a normal field object and this function does not show up. This is why it is so easy to miss.
  • Important! The global field that this function references has to be set to the display type that you are stripping out. The function will throw an error if you don't (it probably shouldn't show up as a function if the display type isn't set properly).

Thank you Dean!

| Posted by David Workman on January 12, 2005 at 04:47 PM in Tips | Permalink

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c8d8153ef00d8354224ab69e2

Listed below are links to weblogs that reference [Tip] Function "getAsPlainText" explained:

Comments

Post a comment