[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Saving and retrieving StyledText to/from database

I'm not sure, but when you copy text from the Java editor, it includes styling information when you paste it into Word or a mailer. It should be possible to convert the text and styling into RTF or something.
I recommend posting this question in the SWT newsgroup.


Nick

Alex Chan wrote:
Hi all,

I'm trying out a simple process of entering text into a text field within my RCP application, applying several styles such as bold and italics to the selected portion of the text entered, and then save it into my database via MySQL.

So far, I have managed to get the intended & selected portion of the text to display the correct styles on my UI application (upon executing bold or italic functions but before saving to the database). The function I used also allows me to revert back to my original text before formatting by running through the same function again.

However, I am currently wondering how would I be able to save the text into my database, retrieve and display them on my UI application with the correct formatting?

A troublesome method I have figured out so far would be applying specific tags for each style and append them to the text before saving the entire string into the database. Upon retrieval, I would have to detect for these tags and run thru the appropriate function again.

Could anyone out there help me out or point me in the right direction on this issue? Thanks a lot!.

Cheers