includes/clientside/tinymce/plugins/emotions/js/emotions.js
author Dan
Sun, 21 Dec 2008 17:56:32 -0500
changeset 784 72df14a56a03
parent 335 67bd3121a12e
permissions -rw-r--r--
Added spell-checking support for TinyMCE on user request (see: http://forum.enanocms.org/topic/11/)

tinyMCEPopup.requireLangPack();

var EmotionsDialog = {
	init : function(ed) {
		tinyMCEPopup.resizeToInnerSize();
	},

	insert : function(file, title) {
		var ed = tinyMCEPopup.editor, dom = ed.dom;

		tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', {
			src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file,
			alt : ed.getLang(title),
			title : ed.getLang(title),
			border : 0
		}));

		tinyMCEPopup.close();
	}
};

tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);