[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 core.html

Zen Cart 源代码 core.html




下载文件

文件名: core.html
文件类型: HTML文件
文件大小: 6.21 KiB
MD5: 644b643684467327c4762e0003b5f5b9

core.html - 关闭高亮
  1. <title>Example of HTMLArea 3.0</title>
  2.  
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4.  
  5. <!-- Configure the path to the editor.  We make it relative now, so that the
  6.    example ZIP file will work anywhere, but please NOTE THAT it's better to
  7.    have it an absolute path, such as '/htmlarea/'. -->
  8. <script type="text/javascript">
  9.   _editor_url = "../";
  10.   _editor_lang = "en";
  11. <script type="text/javascript" src="../htmlarea.js"></script>
  12.  
  13. <style type="text/css">
  14. html, body {
  15.   font-family: Verdana,sans-serif;
  16.   background-color: #fea;
  17.   color: #000;
  18. }
  19. a:link, a:visited { color: #00f; }
  20. a:hover { color: #048; }
  21. a:active { color: #f00; }
  22.  
  23. textarea { background-color: #fff; border: 1px solid 00f; }
  24.  
  25. <script type="text/javascript">
  26. var editor = null;
  27. function initEditor() {
  28.   editor = new HTMLArea("ta");
  29.  
  30.   // comment the following two lines to see how customization works
  31.   editor.generate();
  32.   return false;
  33.  
  34.   var cfg = editor.config; // this is the default configuration
  35.   cfg.registerButton({
  36.     id        : "my-hilite",
  37.     tooltip   : "Highlight text",
  38.     image     : "ed_custom.gif",
  39.     textMode  : false,
  40.     action    : function(editor) {
  41.                   editor.surroundHTML("<span class=\"hilite\">", "</span>");
  42.                 },
  43.     context   : 'table'
  44.   });
  45.  
  46.   cfg.toolbar.push(["linebreak", "my-hilite"]); // add the new button to the toolbar
  47.  
  48.   // BEGIN: code that adds a custom button
  49.   // uncomment it to test
  50.   var cfg = editor.config; // this is the default configuration
  51.   /*
  52.   cfg.registerButton({
  53.     id        : "my-hilite",
  54.     tooltip   : "Highlight text",
  55.     image     : "ed_custom.gif",
  56.     textMode  : false,
  57.     action    : function(editor) {
  58.                   editor.surroundHTML("<span class=\"hilite\">", "</span>");
  59.                 }
  60.   });
  61.   */
  62.  
  63. function clickHandler(editor, buttonId) {
  64.   switch (buttonId) {
  65.     case "my-toc":
  66.       editor.insertHTML("<h1>Table Of Contents</h1>");
  67.       break;
  68.     case "my-date":
  69.       editor.insertHTML((new Date()).toString());
  70.       break;
  71.     case "my-bold":
  72.       editor.execCommand("bold");
  73.       editor.execCommand("italic");
  74.       break;
  75.     case "my-hilite":
  76.       editor.surroundHTML("<span class=\"hilite\">", "</span>");
  77.       break;
  78.   }
  79. };
  80. cfg.registerButton("my-toc",  "Insert TOC", "ed_custom.gif", false, clickHandler);
  81. cfg.registerButton("my-date", "Insert date/time", "ed_custom.gif", false, clickHandler);
  82. cfg.registerButton("my-bold", "Toggle bold/italic", "ed_custom.gif", false, clickHandler);
  83. cfg.registerButton("my-hilite", "Hilite selection", "ed_custom.gif", false, clickHandler);
  84.  
  85. cfg.registerButton("my-sample", "Class: sample", "ed_custom.gif", false,
  86.   function(editor) {
  87.     if (HTMLArea.is_ie) {
  88.       editor.insertHTML("<span class=\"sample\">&nbsp;&nbsp;</span>");
  89.       var r = editor._doc.selection.createRange();
  90.       r.move("character", -2);
  91.       r.moveEnd("character", 2);
  92.       r.select();
  93.     } else { // Gecko/W3C compliant
  94.       var n = editor._doc.createElement("span");
  95.       n.className = "sample";
  96.       editor.insertNodeAtSelection(n);
  97.       var sel = editor._iframe.contentWindow.getSelection();
  98.       sel.removeAllRanges();
  99.       var r = editor._doc.createRange();
  100.       r.setStart(n, 0);
  101.       r.setEnd(n, 0);
  102.       sel.addRange(r);
  103.     }
  104.   }
  105. );
  106.  
  107.  
  108.   /*
  109.   cfg.registerButton("my-hilite", "Highlight text", "ed_custom.gif", false,
  110.     function(editor) {
  111.       editor.surroundHTML('<span class="hilite">', '</span>');
  112.     }
  113.   );
  114.   */
  115.   cfg.pageStyle = "body { background-color: #efd; } .hilite { background-color: yellow; } "+
  116.                   ".sample { color: green; font-family: monospace; }";
  117.   cfg.toolbar.push(["linebreak", "my-toc", "my-date", "my-bold", "my-hilite", "my-sample"]); // add the new button to the toolbar
  118.   // END: code that adds a custom button
  119.  
  120.   editor.generate();
  121. }
  122. function insertHTML() {
  123.   var html = prompt("Enter some HTML code here");
  124.   if (html) {
  125.     editor.insertHTML(html);
  126.   }
  127. }
  128. function highlight() {
  129.   editor.surroundHTML('<span style="background-color: yellow">', '</span>');
  130. }
  131.  
  132. </head>
  133.  
  134. <!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
  135.     customizing the editor.  It's the easiest way! :) -->
  136. <body onload="initEditor()">
  137.  
  138. <h1>HTMLArea 3.0</h1>
  139.  
  140. <p>A replacement for <code>TEXTAREA</code> elements.  &copy; <a
  141. href="http://interactivetools.com">InteractiveTools.com</a>, 2003-2004.</p>
  142.  
  143. <form action="test.cgi" method="post" id="edit" name="edit">
  144.  
  145. <textarea id="ta" name="ta" style="width:100%" rows="20" cols="80">
  146.   &lt;p&gt;Here is some sample text: &lt;b&gt;bold&lt;/b&gt;, &lt;i&gt;italic&lt;/i&gt;, &lt;u&gt;underline&lt;/u&gt;. &lt;/p&gt;
  147.   &lt;p align=center&gt;Different fonts, sizes and colors (all in bold):&lt;/p&gt;
  148.   &lt;p&gt;&lt;b&gt;
  149.    &lt;font face="arial"           size="7" color="#000066"&gt;arial&lt;/font&gt;,
  150.    &lt;font face="courier new"     size="6" color="#006600"&gt;courier new&lt;/font&gt;,
  151.    &lt;font face="georgia"         size="5" color="#006666"&gt;georgia&lt;/font&gt;,
  152.    &lt;font face="tahoma"          size="4" color="#660000"&gt;tahoma&lt;/font&gt;,
  153.    &lt;font face="times new roman" size="3" color="#660066"&gt;times new roman&lt;/font&gt;,
  154.    &lt;font face="verdana"         size="2" color="#666600"&gt;verdana&lt;/font&gt;,
  155.    &lt;font face="tahoma"          size="1" color="#666666"&gt;tahoma&lt;/font&gt;
  156.   &lt;/b&gt;&lt;/p&gt;
  157.   &lt;p&gt;Click on &lt;a href="http://www.interactivetools.com/"&gt;this link&lt;/a&gt; and then on the link button to the details ... OR ... select some text and click link to create a &lt;b&gt;new&lt;/b&gt; link.&lt;/p&gt;
  158.  
  159. <p />
  160.  
  161. <input type="submit" name="ok" value="  submit  " />
  162. <input type="button" name="ins" value="  insert html  " onclick="return insertHTML();" />
  163. <input type="button" name="hil" value="  highlight text  " onclick="return highlight();" />
  164.  
  165. <a href="javascript:mySubmit()">submit</a>
  166.  
  167. <script type="text/javascript">
  168. function mySubmit() {
  169. // document.edit.save.value = "yes";
  170. document.edit.onsubmit(); // workaround browser bugs.
  171. document.edit.submit();
  172. };
  173.  
  174. </form>
  175.  
  176. </body>
  177. </html>
  178.