view static/js/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js @ 138:fc86604ea0ad

Update home page with Guitar Player magazine cover.
author Brian Neal <bgneal@gmail.com>
date Fri, 14 Feb 2014 19:42:42 -0600
parents 966cde8635c0
children
line wrap: on
line source
tinyMCEPopup.requireLangPack();

var ExampleDialog = {
	init : function() {
		var f = document.forms[0];

		// Get the selected contents as text and place it in the input
		f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'});
		f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg');
	},

	insert : function() {
		// Insert the contents from the input into the document
		tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value);
		tinyMCEPopup.close();
	}
};

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