summaryrefslogtreecommitdiff
path: root/program/js/editor_images.js
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2007-12-11 04:20:01 +0000
committersvncommit <devs@roundcube.net>2007-12-11 04:20:01 +0000
commit4315b0086b14cd5266b4cb824c3bd95aa550240c (patch)
treea9bfe0abb484200015e792faacd68c706d972f7a /program/js/editor_images.js
parentdeb30262a766df2886e2bad2a5612a1040b6b05d (diff)
added ability to insert attached images in HTML editor
Diffstat (limited to 'program/js/editor_images.js')
-rw-r--r--program/js/editor_images.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/program/js/editor_images.js b/program/js/editor_images.js
new file mode 100644
index 000000000..ddac044cc
--- /dev/null
+++ b/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]);
+ }
+};