1 <html xmlns="http://www.w3.org/1999/xhtml">
\r
3 <title>{$lang_template_title}</title>
\r
4 <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
\r
5 <script language="javascript" type="text/javascript">
\r
8 var inst = tinyMCE.selectedInstance;
\r
9 var elm = inst.getFocusElement();
\r
11 alert("Got a window argument from plugin: " + tinyMCE.getWindowArg('some_custom_arg'));
\r
13 // Set the form item value to the selected node element name
\r
14 document.forms[0].nodename.value = elm.nodeName;
\r
17 function insertSomething() {
\r
18 // Execute the mceTemplate command without UI this time
\r
19 tinyMCEPopup.execCommand('mceTemplate');
\r
22 tinyMCEPopup.close();
\r
26 <base target="_self" />
\r
28 <body onload="tinyMCEPopup.executeOnLoad('init();');">
\r
29 <form onsubmit="insert();return false;">
\r
30 <h3>{$lang_template_title}</h3>
\r
32 <!-- Gets filled with the selected elements name -->
\r
33 <div style="margin-top: 10px; margin-bottom: 10px">
\r
34 The selected element name: <input type="text" name="nodename" />
\r
37 <div class="mceActionPanel">
\r
38 <div style="float: left">
\r
39 <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertSomething();" />
\r
42 <div style="float: right">
\r
43 <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
\r