Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > very basic HTML java editor

Reply
Thread Tools

very basic HTML java editor

 
 
onetitfemme
Guest
Posts: n/a
 
      09-20-2006
hi,
..
I need some intro code to a very basic HTML java editor, that would
allow only italics, bold, lists ... but users are not supposed to do
any scripting, just highlight and click on "italics", "bold, "lists"
....
..
if users shouldn't enter the "<" or ">" key. So I know they didn't use
the editor to send malicious scripts to other people (I will
doublecheck on the back end anyway )
..
The code examples I have found are bloated and framed by the
particular developer's mind. I just need something very basic and
probably build on top of it a little bit
..
Any ideas, leads, etc?
..
Thank you
onetitfemme

 
Reply With Quote
 
 
 
 
onetitfemme
Guest
Posts: n/a
 
      09-24-2006
I found demo code with pretty much what I was looking for in the
excelent book "Swing" by Matthew Robinson and Pavel Vorobiev. 2003 |
912 pages | ISBN: 193011088X
..
code examples you can get from http://www.manning.com/robinson2/
..
I was trying to enter some basic Math scripts such as
<math>2^{4^{n}}</math>, but the HTMLWordProcessor didn't swallow them.
I also tried to enter non-ASCII characters (actually simplified
CHinese) using box IE and FIreFox and got weird characters and little
boxes.
..
I then went "to the source" Tools -> HTML Source and forcibly
tried to reset the HTML heading as something like:
..
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<!-- Theme design by xoopsdesign.com http://www.xoopsdesign.com -->
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
..
as it is the case in the page but got:
..
javax.swing.text.ChangedCharSetException
at
javax.swing.text.html.parser.DocumentParser.handle EmptyTag(DocumentParser.java:169)
at javax.swing.text.html.parser.Parser.startTag(Parse r.java:372)
at javax.swing.text.html.parser.Parser.parseTag(Parse r.java:1846)
at javax.swing.text.html.parser.Parser.parseContent(P arser.java:1881)
at javax.swing.text.html.parser.Parser.parse(Parser.j ava:2047)
at
javax.swing.text.html.parser.DocumentParser.parse( DocumentParser.java:106)
at
javax.swing.text.html.parser.ParserDelegator.parse (ParserDelegator.java:7
at javax.swing.text.html.HTMLEditorKit.read(HTMLEdito rKit.java:230)
at HtmlProcessor$27.actionPerformed(HtmlProcessor.jav a:569)
at
javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1786)
at
javax.swing.AbstractButton$ForwardActionEvents.act ionPerformed(AbstractButton.java:1839)
at
javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:420)
at
javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:25
at javax.swing.AbstractButton.doClick(AbstractButton. java:289)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(Bas icMenuItemUI.java:1113)
at
javax.swing.plaf.basic.BasicMenuItemUI$MouseInputH andler.mouseReleased(BasicMenuItemUI.java:943)
at java.awt.Component.processMouseEvent(Component.jav a:5100)
at java.awt.Component.processEvent(Component.java:489 7)
at java.awt.Container.processEvent(Container.java:156 9)
at java.awt.Component.dispatchEventImpl(Component.jav a:3615)
at java.awt.Container.dispatchEventImpl(Container.jav a:1627)
at java.awt.Component.dispatchEvent(Component.java:34 77)
at
java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:3483)
at
java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:319
at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:312
at java.awt.Container.dispatchEventImpl(Container.jav a:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606 )
at java.awt.Component.dispatchEvent(Component.java:34 77)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 480)
at
java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:151)
at
java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:145)
at
java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:100)

 
Reply With Quote
 
 
 
 
onetitfemme
Guest
Posts: n/a
 
      09-24-2006
you can find examples of various math HTMl examples here:
..
http://www.mozilla.org/projects/math...o/basics.xhtml
..
otf

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need a very easy to use WYSIWYG editor, not a full-featured editor. I. Myself HTML 39 05-31-2006 03:20 PM
very very basic question aghazalp Python 6 04-02-2006 09:35 PM
Very very very basic question Peter C Programming 14 02-14-2005 09:46 AM
Cinema.Craft.Encoder.SP.v2.70.01.05, Magic.Bullet.Editor.v.1.01.for.Avid.Xpress.Pro, Magic.Bullet.Editor.v.1.01.for.Premiere.Pro, Magic.Bullet.Editor.v.1.01.for.Sony.Vegas, Avid.Xpress.Pro.HD.v5.0 1CD, Sony.Vegas.v5.0d, ola DVD Video 0 01-14-2005 10:53 AM
ANN: New low-cost XML Editor, XSLT Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio Java 0 08-03-2004 03:53 PM



Advertisments