summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/editor_images.js
diff options
context:
space:
mode:
authorestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-12-11 04:20:01 +0000
committerestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-12-11 04:20:01 +0000
commitf667be8b4337909cfcaaf0901e1ef7d19580b716 (patch)
tree5a453f2411740871da3b4e51b5ef6fe569079361 /roundcubemail/program/js/editor_images.js
parenta7aaf57b0c34311ceb8a5cf7a4b0b9fd11042f91 (diff)
added ability to insert attached images in HTML editor
git-svn-id: https://svn.roundcube.net/trunk@940 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/editor_images.js')
-rw-r--r--roundcubemail/program/js/editor_images.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/roundcubemail/program/js/editor_images.js b/roundcubemail/program/js/editor_images.js
new file mode 100644
index 000000000..ddac044cc
--- /dev/null
+++ b/roundcubemail/program/js/editor_images.js
@@ -0,0 +1,20 @@
+
+var rc_client = tinyMCEPopup.windowOpener.rcube_webmail_client;
+if (rc_client.gui_objects.attachmentlist)
+{
+ var tinyMCEImageList = new Array();
+ var attachElems = rc_client.gui_objects.attachmentlist.getElementsByTagName("li");
+ for (i = 0; i < attachElems.length; i++)
+ {
+ var liElem = attachElems[i];
+ var fname = attachElems[i].id;
+ for (j = 0; j < liElem.childNodes.length; j++)
+ {
+ if (liElem.childNodes[j].nodeName == "#text")
+ {
+ fname = liElem.childNodes[j].nodeValue;
+ }
+ }
+ tinyMCEImageList.push([fname, rc_client.env.comm_path+'&_action=display-attachment&_file='+attachElems[i].id]);
+ }
+};