Location: PHPKode > projects > Db-newsletter > db-newsletter/tiny_mce/plugins/_template/popup.htm
<html xmlns="http://www.w3.org/1999/xhtml">
	<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
	<script language="javascript" type="text/javascript">
		function init() {
			var inst = tinyMCE.selectedInstance;
			var elm = inst.getFocusElement();

			alert("Got a window argument from plugin: " + tinyMCE.getWindowArg('some_custom_arg'));

			// Set the form item value to the selected node element name
			document.forms[0].nodename.value = elm.nodeName;

		function insertSomething() {
			// Execute the mceTemplate command without UI this time

			// Close the dialog
	<base target="_self" />
<body onload="tinyMCEPopup.executeOnLoad('init();');"> 
	<form onsubmit="insert();return false;">

		<!-- Gets filled with the selected elements name -->
		<div style="margin-top: 10px; margin-bottom: 10px">
			The selected element name: <input type="text" name="nodename" />

		<div class="mceActionPanel">
			<div style="float: left">
				<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertSomething();" />

			<div style="float: right">
				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
Return current item: Db-newsletter