1. Why is Swing Parser's handleText not handling nested tags? stackoverflow.comI need to transform some HTML text that has nested tags to decorate 'matches' with a css attribute to highlight it (like firefox search). I can't just do a simple replace (think ... |
2. How do I retrieve the attribute of an element using Swing's HTMLEditorKit.ParserCallback? stackoverflow.comI am extending HTMLEditorKit.ParserCallback to parse HTML. I am matching on a certain element type in an overridden method like this:
|
3. Strange HTMLEditorKit problem stackoverflow.comThe code snippet below has the problem, that it will not work, if the reload button is pressed in the browser containing the applet window. It works on the first start ... |
4. How to make Swing use my own HTMLEditorKit for JLabel/JButton/etc stackoverflow.comLets say I've made a sublcass of |
5. Troubble with HTML-Tags in a HTMLEditorKit coderanch.com |
6. Custom Visual Markup using the HtmlEditorKit coderanch.comHi friends, I'm trying to create a 'simple' html/xml editor, where I can highlight a word/s then click a button which applies a markup tag to the selection. Also depending on the markup tag the editor pane would show a visual change (but not the makup tag) i.e. |
7. HTMLEditorKit coderanch.comI hav a JEditorPane and I am using HTMLEditorKit to display text in it in 2 contenttypes 1]HTML (text/html) 2]TEXT i.e the source view of the same HTML (text/plain) The content-type view, i.e. the WYSIWYG view for the HTML and the source view for the HTML is switched using a group of 2 radio button selection. My problem is that, I ... |
8. NullPointerException using HtmlEditorKit coderanch.com |
9. Subclassing HTMLEditorKit coderanch.comI've never done this for replacing the handling of a standard type, but for a non-standard type, you do this: myJEditorPaneInstance.setEditorKitForContentType("text/foo", myCustomEditorKitInstance); before setting the content type or loading in a file. I'd try this first and see if it works -- I'd expect it to, but you never know, I guess. |
10. HTMLEditorKit & Performance coderanch.comi gave this a quick try and ... it wasn't so quick. however, performance was not horrible - especially for smaller or less complex documents. just some ideas from a 10k ft view: possible places to look(?) - (1) Format of the HTML report(s) you're reading JEditorpane - from what i can see - has about 15 html handling bugs being ... |
11. custom tags using an HTMLEditorKit subclass coderanch.comI've created a subclass of HTMLEditorKit called CustomEditorKit(see code below) At the point in the code marked with the 'UGH' comment, I want to check to see if the unknown element is of type |
12. using HTMLEditorKit and trying to INDENT, what is the HTML tag for INDENTATION ? coderanch.comHi guys, I'm using an HTMLEditorKit with HTML tags. since i am newbie to html I wonder if anyone knows how to indent in a text??? My end result suppose to be like this: Date: Nov 27, 2004 File: dans.txt The indentation suppose to take place between the date ("Nov 27, 2004") and the word "File" my code looks like this: ... |
13. Applying CSS in HTMLEditorKit coderanch.com |
14. Maintaining paragraph in HTMLEditorKit coderanch.com |
15. StyleSheet in HTMLEditorKit coderanch.comHi! I try to change a style by using the following code SimpleAttributeSet cls = new SimpleAttributeSet(); cls.addAttribute(HTML.Attribute.STYLE, "text-decoration: underline;" ); SimpleAttributeSet attr = new SimpleAttributeSet(); attr.addAttribute(HTML.Tag.SPAN, cls); setAttributeSet(attr , false ); private void setAttributeSet( AttributeSet attr, boolean setParagraphAttributes ) { int xStart = editor.getSelectionStart(); int xFinish = editor.getSelectionEnd(); if( ( xStart != xFinish ) || setParagraphAttributes ){ SimpleAttributeSet s = ... |
16. HTMLEditorKIT coderanch.comOriginally posted by vidya sagar: In my application there is textarea in which users are allowed to paste their html content(possibly mail contents from outlook they have paste it). For that i used below code JTextpane subjectPanel = new JTextPane(); subjectPanel.setContentType("text/html"); subjectPanel.setEditorKit(new javax.swing.text.html.HTMLEditorKit()); While running,when i copied contents from outlook and pasting into application, extra brackets along with text wording 'fragments' ... |
17. Custom HTMLEditorKit - to create paginated HTML file coderanch.com |
18. parsing HTML with Swing's HTMLEditorKit.Parser problem forums.oracle.comI've been using the HTMLEditorKit.Parser to do parsing on a html page just fine until I wanted to get an |