~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/emotions/jscripts/functions.js

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function init() {
 
2
        tinyMCEPopup.resizeToInnerSize();
 
3
}
 
4
 
 
5
function insertEmotion(file_name, title) {
 
6
        title = tinyMCE.getLang(title);
 
7
 
 
8
        if (title == null)
 
9
                title = "";
 
10
 
 
11
        // XML encode
 
12
        title = title.replace(/&/g, '&');
 
13
        title = title.replace(/\"/g, '"');
 
14
        title = title.replace(/</g, '&lt;');
 
15
        title = title.replace(/>/g, '&gt;');
 
16
 
 
17
        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 + '" />';
 
18
 
 
19
        tinyMCE.execCommand('mceInsertContent', false, html);
 
20
        tinyMCEPopup.close();
 
21
}