diff options
author | svncommit <devs@roundcube.net> | 2006-09-14 03:49:28 +0000 |
---|---|---|
committer | svncommit <devs@roundcube.net> | 2006-09-14 03:49:28 +0000 |
commit | a0109c4933e0bfb5ed9dbcf94f932991ca689542 (patch) | |
tree | 955246969bf9da5d5335d1d7c483025fdbd50407 /program/js/tiny_mce/plugins/emotions/jscripts | |
parent | bb5ddfa0ade5fbd2ed9be16e51d4ce695252eece (diff) |
Initial TinyMCE editor support (still need to work on spellcheck and skins)
Diffstat (limited to 'program/js/tiny_mce/plugins/emotions/jscripts')
-rw-r--r-- | program/js/tiny_mce/plugins/emotions/jscripts/functions.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/program/js/tiny_mce/plugins/emotions/jscripts/functions.js b/program/js/tiny_mce/plugins/emotions/jscripts/functions.js new file mode 100644 index 000000000..95a9eafe8 --- /dev/null +++ b/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, '&');
+ title = title.replace(/\"/g, '"');
+ title = title.replace(/</g, '<');
+ title = title.replace(/>/g, '>');
+
+ 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();
+}
|