We help IT Professionals succeed at work.

How to convert the data from text format to html format in java (Applet)

kkr
kkr asked
on
I want an Applet running in the browser which should look like an text editor where the user can type text and format the text (bold,underline,italicc,hyperlink...) and on submit must generate corresponding html content that can be used as an html page. Is there free code, components avaiblable on net. Please give some tips.
(May be the way mail services do in compose in html format)
thanx in advance
ken
Comment
Watch Question

Commented:
Hi,


If I remember correctly, Swing has classes that handle HTML code, they even got a text editor sample. All you need to do, is create a Swing Applet using those classes and then send the HTML document to a servlet or CGI for storing on the web-server. Once the web-server has your page, the applet can then redirect the browser to the newly saved page.


Doron
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010
Commented:
Yes, the JEditorPane class would be a good start.
There's still a bit of work for you to do to build your editor, but it gives you a suitable building block.
i have used Ektron's eWebEditPro with much success to emulate the "hotmail rich text editor" loook.  I am not aware of any free software that does it - check it out www.ektron.com 

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Split points between doronb and objects

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venabili
EE Cleanup Volunteer

Explore More ContentExplore courses, solutions, and other research materials related to this topic.