I have a JEditorPane that uses text/html so it can display images. I can insert images using my own methods (i.e with a JFileChooser) but when it comes to pasting images, it gets a bit messy. I get a load of div tags and <!--StartFragment-->/<!--EndFragment--> which I do not want – I simply need whats inbetween the <img> tags! Currently I am just using DefaultEditorKit.pasteAction(); – I have experiemted with other ways though, no luck!
Any one have the same problem? and / or Know of a working solution?
Thanks in Advance
Andy
May be this can help
http://java-sl.com/tip_local_images.html
All you need is to insert the tag with proper image reference and place the image in the local cache.