A tumblelog CMS built on AJAX, PHP and MySQL.

functions.js 666B

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