Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2004

Tip: Looking for answers? Try searching our database.

HTMLEditorKit inserting html

Thread view: 
Mark Timmings - 22 Jan 2004 10:25 GMT
Hi all

I have a an applet (written by someone else) which I've been asked to work
on. They are using the HTMLEditorKit. Now they use InsertHTMLTextAction to
insert the HTML into the document. However I need to insert html where I do
not know what the HTML is prior to insertion. i.e. the user may wish to
enter HTML (directly) themselves into an edit box and then have this appear
within the editor. Now the InsertHTMLTextAction for some reason requires
that you tell it what the HTML is to be entered - obviously I could check
the html prior to insertion and try and find out what HTML is about to be
inserted, but is this the only way to achieve this functionality ?

In other words, using the HTMLEditorKit, how would I insert HTML into the
document/editor kit without first knowing what the HTML consists of ?

Many thanks
Mark
Andrew Thompson - 22 Jan 2004 12:36 GMT
...
| In other words, using the HTMLEditorKit, how would I insert HTML into the
| document/editor kit without first knowing what the HTML consists of ?

java.util.Psychic

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Mark Timmings - 22 Jan 2004 16:14 GMT
So basically are you saying you've know idea how to get this to work ?

> | In other words, using the HTMLEditorKit, how would I insert
> HTML into the
[quoted text clipped - 8 lines]
> * http://www.1point1C.org/ 1.1C - Superluminal!
> * http://www.AThompson.info/andrew/ personal site
Andrew Thompson - 22 Jan 2004 16:40 GMT
| So basically are you saying you've know idea

..do you mean 'no idea'?       ;-)

|.. how to get this to work ?

It depends on what you actually
wish to achieve.

e.g.  Yould write some html containing
<form>'s with a <textarea>/<input>
type arrangement, to allow the user to
enter plain text.

You could write raw html in a
(java) TextArea and be grabbing the
entire text every so many milliseconds
and displaying the result in the JEditorPane
(whatever) to be updated with the result
rendered as html.

It depends on what you want to do,
a matter on which, after reading your
post, I was entirely unclear.

Hence my tongue in cheek response.

I _knew_ I should have added...      ;-)

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
abc - 22 Jan 2004 16:51 GMT
Don't worry about it - I appear to have solved it myself.

> | So basically are you saying you've know idea
>
[quoted text clipped - 30 lines]
> * http://www.1point1C.org/ 1.1C - Superluminal!
> * http://www.AThompson.info/andrew/ personal site
Andrew Thompson - 22 Jan 2004 17:55 GMT
| Don't worry about it -

No, no.  Of course not.
But then, ..that goes without saying.      [   ;-)   ]

|..I appear to have solved it myself.

Your solution?
..And FTR, your _question_?

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Thomas Weidenfeller - 23 Jan 2004 09:38 GMT
> Don't worry about it - I appear to have solved it myself.

Thanks for wasting our time.

/Thomas


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.