includes/clientside/tinymce/plugins/emotions/jscripts/functions.js
author Dan
Sun, 23 Sep 2007 23:21:10 -0400
changeset 142 ca9118d9c0f2
parent 1 fe660c52c48f
permissions -rw-r--r--
Rebrand as 1.0.2 (Coblynau); internal links are now parsed by RenderMan::parse_internal_links()

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