]> code.citadel.org Git - citadel.git/blob - webcit/tiny_mce/plugins/_template/popup.htm
* Removed the Kevin Roth rich text editor and replaced it with TinyMCE.
[citadel.git] / webcit / tiny_mce / plugins / _template / popup.htm
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3         <title>{$lang_template_title}</title>
4         <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
5         <script language="javascript" type="text/javascript">
6         <!--
7                 function init() {
8                         var inst = tinyMCE.selectedInstance;
9                         var elm = inst.getFocusElement();
10
11                         alert("Got a window argument from plugin: " + tinyMCE.getWindowArg('some_custom_arg'));
12
13                         // Set the form item value to the selected node element name
14                         document.forms[0].nodename.value = elm.nodeName;
15                 }
16
17                 function insertSomething() {
18                         // Execute the mceTemplate command without UI this time
19                         tinyMCEPopup.execCommand('mceTemplate');
20
21                         // Close the dialog
22                         tinyMCEPopup.close();
23                 }
24         //-->
25         </script>
26 </head>
27 <body onload="init();"> 
28         <form onsubmit="insert();return false;">
29                 <h3>{$lang_template_title}</h3>
30
31                 <!-- Gets filled with the selected elements name -->
32                 <div style="margin-top: 10px; margin-bottom: 10px">
33                         The selected element name: <input type="text" name="nodename" />
34                 </div>
35
36                 <div class="mceActionPanel">
37                         <div style="float: left">
38                                 <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertSomething();" />
39                         </div>
40
41                         <div style="float: right">
42                                 <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
43                         </div>
44                 </div>
45         </form>
46 </body> 
47 </html>