Skip to main content
July 20, 2009
Question

Textflow examples...how to export to db

  • July 20, 2009
  • 1 reply
  • 761 views

Hi,

I'm studying the textflow framework examples and see that they use a canvas + sprite child with an editManager and IEditManager rather than the textarea.    My question is, once the user has made all the formatting changes, how can I export the contents to a database to save it?  I know with the textarea component there was the htmlText, but I'm not seeing an option of sorts. Flex will be the only accessor of this info.

Thank you!

This topic has been closed for replies.

1 reply

Adobe Employee
July 20, 2009

The TextConverter class supports converting a TextFlow to and from a string.  For example,

var markup:String =TextConverter.export(textFlow,TextConverter.TEXT_LAYOUT_FORMAT,ConversionType.STRING_TYPE)

and

var  textFlow:TextFlow = TextConverter.importToFlow(markup, TextConverter.TEXT_LAYOUT_FORMAT);

TextLayoutFormat roundtrips with all properties and content.

Richard