includes/clientside/tinymce/plugins/emotions/jscripts/functions.js
author Dan
Fri, 21 Dec 2007 18:59:30 -0500
changeset 332 000773138650
parent 1 fe660c52c48f
permissions -rw-r--r--
[Minor] fix non-localized string in installer (install_stg_buildindex_*); fix wrong string_id in pophelp:url_schemes

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();
}