Hi Boudewijn,
I would say, the GUI shows the RTF inside the form based on the configured form editor font. When saving a typed value in the control to the database, no styling is saved except when the user styled a specific part of the text itself.
This way the RTF text could be styled from the out-side, displaying it in a report for example. So the font you specified for the report itself will be applied to the non formatted text.
I don't think we provide any helpful functions yet to strip formatting from RTF text yet.
Regards,
Erik
In case someone stumbles upon this thread while trying to solve the same problem, we discussed a number of options:
- leave RTF as-is;
- create an additional plain text column for each RTF column, and migrate on a case-by-case basis (on inserts, only use plain text; on edits provide RTF as read only and plain text on a best effort basis, as a starting point for the user to copy/paste or correct by hand;
- change the RTF columns to plain texst and strip all RTF control codes from the RTF them.
We went with the last option. It turned out to be quite a hassle, and near impossible to cleanly strip all RTF control codes.
The solution takes a list of control codes and a bit of logic to iterate through those codes. We defined a table which holds all control codes from the RTF specifications, additional codes and hacks, and an iteration number.
The logic builds replace statements based on the provided table, column and those codes.
The current version of the logic results in a mostly cleaned up plain text field. There are some stray numbers and characters.
The solution is intended for a single conversion; it is a brute force replacement of > 1000 iterations per field, as such it does not combine well with update triggers.