Blame view

js/_tiny_mce/plugins/emotions/jscripts/functions.js 645 Bytes
42868d70   andryeyev   Создал GIT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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, '&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();
  }