summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/tiny_mce/plugins/emotions/jscripts/functions.js
diff options
context:
space:
mode:
authorestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-09-14 03:49:28 +0000
committerestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-09-14 03:49:28 +0000
commita4332663cfcdb53b352c8646f78855ae3436cfec (patch)
treeceaf2d8afbf791e9d007cfe7a676fc1e0790b7a6 /roundcubemail/program/js/tiny_mce/plugins/emotions/jscripts/functions.js
parent8b3252550799d1b69ba8ff0c0fb3f916608c2e1d (diff)
Initial TinyMCE editor support (still need to work on spellcheck and skins)
git-svn-id: https://svn.roundcube.net/trunk@344 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/tiny_mce/plugins/emotions/jscripts/functions.js')
-rw-r--r--roundcubemail/program/js/tiny_mce/plugins/emotions/jscripts/functions.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/roundcubemail/program/js/tiny_mce/plugins/emotions/jscripts/functions.js b/roundcubemail/program/js/tiny_mce/plugins/emotions/jscripts/functions.js
new file mode 100644
index 000000000..95a9eafe8
--- /dev/null
+++ b/roundcubemail/program/js/tiny_mce/plugins/emotions/jscripts/functions.js
@@ -0,0 +1,21 @@
+function init() {
+ tinyMCEPopup.resizeToInnerSize();
+}
+
+function insertEmotion(file_name, title) {
+ title = tinyMCE.getLang(title);
+
+ if (title == null)
+ title = "";
+
+ // XML encode
+ title = title.replace(/&/g, '&amp;');
+ title = title.replace(/\"/g, '&quot;');
+ title = title.replace(/</g, '&lt;');
+ title = title.replace(/>/g, '&gt;');
+
+ var html = '<img src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" mce_src="' + tinyMCE.baseURL + "/plugins/emotions/images/" + file_name + '" border="0" alt="' + title + '" title="' + title + '" />';
+
+ tinyMCE.execCommand('mceInsertContent', false, html);
+ tinyMCEPopup.close();
+}