I would like to retain my tables and bullets within my RTF documents. When I paste a note into my textarea, theses features do appear. Once saved, I loose the formatting. Is there something I need to do to preserve these items?
About more than a year ago I have gone thru the process of trying to use TextArea limited RTF support, which output of the control (windows version versus mac version) is not equal, as expected.
I did also tried with TextArea.WinRTFDataMBS and TextArea.RTFDataMBS but it did not work either for me since I have mac and windows versions of my desktop application mixed working on the same database and RTF-outputs were still not equal.
Finally I went with HTMLEdit , which is now a part of GraffitiSuite.
[quote=337104:@Emile Schwarz]You share the way ypu get the RTF back (TextArea1.StyledText.RTFData = data.Field("Note").StringValue), but not the way you save it.
As you discovers,it is a subset of RTF that Xojo deals with. You have to save the whole RTF, then open it (like youve done or in a rtf file).
How do you save the RTF from your TextArea ?[/quote]
Here is how I save the textarea to my db field.
sql = “UPDATE Notes SET Note = '” +TextArea1.StyledText.RTFData + " ’ where TaskID = "+ str(rec)
//msgbox(sql)
App.db.SQLExecute(sql)
[quote=337197:@Dave S]If “NOTE” is defined with an SQLite affinity of TEXT then it may be the issue…
For RTF data I would try using an affinity of BLOB instead
If you want/must use a TEXT affinity, then I would think about using Base64 encoding[/quote]