app/tiny_mce/plugins/emotions/js/emotions.js
author Sverre Rabbelier <srabbelier@gmail.com>
Sat, 14 Feb 2009 14:11:18 +0000
changeset 1310 a3f654f30fbc
parent 154 d2377425d3f2
permissions -rwxr-xr-x
Make document ACL's a constant This makes it possible to refer to it in other modules. Patch by: Sverre Rabbelier

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