[re-posted here after I mistakenly posted to the wrong forum]
I want to be able to drag something into ckeditor from a java applet running on the same web page, so that the dropped 'thing' appears in the editor as an html <img> tag but I'm stuck. Can anybody help?
I can successfully drag text from the applet and have it appear as text in the editor but that doesn't help ... an "<img />" string gets gets turned into "<img .../>>".
I can drag an image file from my WinXP desktop into the editor running in a browser window and it is successfully translated into an <img href="file:///C:/.." /> tag but that doesn't help because I want to generate an href pointing to a website.
I can drag an image from a browser web page into the editor and, as long as its href is a full URL, the editor translates it into an img tag but that doesn't help because I need my applet to be the source. I haven't tried dragging an image from an HTML formatted JTextPane (which might be similar) because I want to use a JTable in the applet.
Can anybody tell me if its possible to generate a Transferable thing from java that will be recognized as an image URL by ckeditor and converted into an img tag? I've got complete control over what goes into the java applet but my knowledge of javascript is close to nothing.
Thanks in advance and sorry if this isn't really the right forum.
David
David Evans
I want to be able to drag something into ckeditor from a java applet running on the same web page, so that the dropped 'thing' appears in the editor as an html <img> tag but I'm stuck. Can anybody help?
I can successfully drag text from the applet and have it appear as text in the editor but that doesn't help ... an "<img />" string gets gets turned into "<img .../>>".
I can drag an image file from my WinXP desktop into the editor running in a browser window and it is successfully translated into an <img href="file:///C:/.." /> tag but that doesn't help because I want to generate an href pointing to a website.
I can drag an image from a browser web page into the editor and, as long as its href is a full URL, the editor translates it into an img tag but that doesn't help because I need my applet to be the source. I haven't tried dragging an image from an HTML formatted JTextPane (which might be similar) because I want to use a JTable in the applet.
Can anybody tell me if its possible to generate a Transferable thing from java that will be recognized as an image URL by ckeditor and converted into an img tag? I've got complete control over what goes into the java applet but my knowledge of javascript is close to nothing.
Thanks in advance and sorry if this isn't really the right forum.
David
David Evans