-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0, 1.3.0_01, 1.4.0
-
generic, sparc
-
generic, solaris_7
Name: tb88898 Date: 01/31/2000
The current implementation of JEditorPane only supports HTML
3.2 with a few additional features. It would be desirable to
have full JTML 4.0 support.
======================================================================
Name: bsC130419 Date: 07/16/2001
java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
Hi,
When using JEditorPane with an html document, the parser doesn't deal with
XHTML correctly. (XHTML being HTML that conforms to XML standards).
Parsing a line such as this:
<p/>
will leave one ">" viewable in the html view.
This is critical to work with xml tag libraries and other xml documents that
don't mess up xml parsers.
Thanks,
Laramie
=================== H.java ==============================
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.text.html.*;
import javax.swing.border.*;
import javax.swing.colorchooser.*;
import javax.swing.filechooser.*;
import javax.accessibility.*;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.util.*;
import java.io.*;
import java.applet.*;
import java.net.*;
public class H {
public static void main(String[] args)
{
new H();
}
public H() {
try {
URL url = null;
String path = null;
path = "/index.html";
url = getClass().getResource(path);
JEditorPane html = new JEditorPane(url);
html.setEditable(false);
JScrollPane scroller = new JScrollPane();
JViewport vp = scroller.getViewport();
vp.add(html);
JFrame f = new JFrame("test");
f.setSize(300,350);
f.getContentPane().add(scroller, BorderLayout.CENTER);
f.setVisible(true);
} catch (Exception e) {
System.out.println("Exception: " + e);
}
}
}
====================================================
========== index.html ==============================
<html>
<body>
<p>You should see extra > characters:</p>
<br/>
<p/>
</body>
</html>
=====================================================
(Review ID: 128207)
======================================================================
- duplicates
-
JDK-4426277 JEditorPane: HTML 4.0 support
-
- Closed
-
-
JDK-4436969 JEditorPane need to support "charset" attribute of HTML.
-
- Closed
-
-
JDK-4423669 Scheme attribute missing from HTML.Attribute
-
- Closed
-
-
JDK-4462828 HTMLEditorKit support
-
- Closed
-
-
JDK-4296022 html4.x support within a JEditorPane
-
- Open
-