Are there any Web App Styled Text controls that can output RTF?
Christian updated MBS DynaPDF to easily place styled text so I’d like to be able to edit styled text on a Web App Page. Unfortunately, the Xojo WebTextArea does not have StyledText like the Desktop TextArea does.
I’d be ok with a Web App html based control, but I’d need it to export RTF…
I am facing a similar issue soon, as I want to use an HTML based control in an iOS app to provide styled text, and I want to print that. So far I have in mind to look at the HTML code, parse the style tags, and print accordingly.
Haven’t tried it, though. Does not hurt experimenting.
Another strategy would be to use a desktop app on your server to convert HTML to RTF and pass that to the Web app. After all, style tags can be parsed, and it is then not too difficult to apply styles runs to a styled TextArea. The only issue being that most Linux servers simply don’t have the UI installed and therefore cannot run desktop apps. Maybe you want to ask your host.
On Windows Server, it should not be an issue. Unless I am mistaken, desktop apps run just fine.
uhhh caution! remembers me back to a vb6/asp project… result was: converting rtf2html back and forth doesn’t work for texts with lots of formating (e.g. lists, different colors, paragraphs etc.). RTF is dead I would recommend not to try it… esp. not in web apps
Well, you never know what a client wants. I’ve definitely heard a lot of crazy stuff from them. Whether I take the project or not depends on how crazy.
But I do agree that RTF is a supremely jacked up format that is hard to implement and even harder to make it compatible across all word processors. MS Word alone adds an amazing amount of crap to RTF which, of course, is what everyone wants to be compatible with.
Talking about MS Word… so it does even with HTML… have you ever tried to copy & paste content between word and HTML Input mask in IE? It’s a blown f* mix of CSS and HTML Code… and text size increases by factor 100 for just 3 lines of descriptive text.
@Hal: Doesn’t DynaPDF export Text-Only aswell? But I guess you need the formated text…
Right. I need styled text. I thought about the back and forth conversion issues. I was thinking of using Tim’s HTML Edit, storing the html and only converting to RTF to make the pdf. Once the PDF is created, I’ll just toss the RTF…
I guess this is not easy… and it leads back to another general question: how to deal with formated content? same question for decades. I am always in favor not to put everything together (e.g. in a database). let the media decide how a given text will be presented. Split huge text blocks in smaller units etc.
this won’t work… or it would just work for basic format options… like bold or italic text…
Maybe I should have mentioned that my goal isn’t to create an entire pdf from a styled control, but essentially use something like Tim’s HTML Edit as a replacement of the Xojo WebTextAreas since it doesn’t support styles within the WebTextArea.
What I just added was converting StyledText object to commands for DynaPDF.
I don’t do RTF there. Just take the StyledText class as a vehicle to pass the style information to my plugins.
Where you got StyledText from is not the problem for my DynaPDF plugin.
Now I know my RTF parser is not perfect. It can read/write the RTF dialect used with TextArea on Mac/Win.
If you want styled text, maybe find your now way and convert it yourself to StyledText object to pass it to DynaPDF.
OR directly convert to the formatting commands needed by WriteFText.