Closed GoogleCodeExporter closed 9 years ago
No, this is not possible because HTML images are just a tag that points to an
URL that defines where the image is located.
However, you can allow an image to be uploaded, then stored on your server in a
location that allows you to display the image so it appears within CKEditor.
It's not necessarily easy, but we've done this with our Open eSignForms
platform, which is open source so you could perhaps use it to reverse engineer
a bit. You can see more about that project at http://open.esignforms.com/
Also, while I know nothing about this related project, they may have something
you can use, too: http://sourceforge.net/projects/jckconnector/
Or maybe they can explain how they did things as it could be easier than what
we did since we store our images in a PostgreSQL database and have a Servlet
that serves the images.
For Open eSignForms, we have a JSP page ckeditorImageBrowser.jsp that is used
by CKEditor to select a previously uploaded image so that it then appears in
the editor. This results in HTML like:
<img alt=""
src="/open-eSignFormsVaadin/images/OldLogo/?iid=3a98674b-ae2e-429c-bb63-27d5e084
62f8" style="width: 180px; height: 90px; " />
And then we have a Servlet & mapping like:
<servlet>
<servlet-name>Image</servlet-name>
<servlet-class>com.esignforms.open.servlet.Image</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Image</servlet-name>
<url-pattern>/images/*</url-pattern>
</servlet-mapping>
so you can see in that code how we serve up the image.
Hope this helps! Good luck...
Original comment by yoz...@gmail.com
on 23 Mar 2012 at 1:52
Holy! Thank you so much for your answers! Both are very useful.
When I have a general enough solution I will contribute back here.
Original comment by feiya...@gmail.com
on 23 Mar 2012 at 5:36
Good luck!
Original comment by yoz...@gmail.com
on 23 Mar 2012 at 5:22
Not a bug with this editor component.
Original comment by yoz...@gmail.com
on 22 Apr 2012 at 1:37
Original issue reported on code.google.com by
feiya...@gmail.com
on 22 Mar 2012 at 9:39