0

So I know how to insert an image in the JeditorPane in Java. But for example I would like to put the image between (for example) the 3 and 4 line of text in my Jeditorpane.

It's like in Gmail where you can edit your Signature and you can put some images in it.. What I am trying to do is an email service provider and I would also like to make my own Signatures...

mKorbel
  • 109,525
  • 20
  • 134
  • 319
DJack
  • 631
  • 1
  • 8
  • 34

2 Answers2

2

What you need is a HTML Editor with live previe:

Ekit seems fairly light (160Ko in one jar, source and jar here)

alt text
(source: hexidec.com)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Khinsu
  • 1,487
  • 11
  • 27
0

Set content type to text/html and JEditorPane will start rendering the assigned text as HTML. This question explains how to put images. No third party library is necessary, unless you want to use HTML features above 3.2.

Community
  • 1
  • 1
Audrius Meškauskas
  • 20,936
  • 12
  • 75
  • 93
  • Wow this Ekit is really good. I hope that I will found what I am searching for. And as I sad I already know how to put an image in editor pane and I have content type text/html. What I don't know is how to add some images randomly between text where I want. As I said I hope that I will find the answer in the source code of Ekit. – DJack Aug 13 '13 at 18:13