Annotation of loncom/html/htmlarea/example-table-operations.html, revision 1.1
1.1 ! www 1: <html>
! 2: <head>
! 3: <title>Example of HTMLArea 3.0</title>
! 4:
! 5: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
! 6:
! 7: <!-- load the main HTMLArea files -->
! 8: <script type="text/javascript" src="htmlarea.js"></script>
! 9: <script type="text/javascript" src="lang/en.js"></script>
! 10: <script type="text/javascript" src="dialog.js"></script>
! 11: <!-- <script type="text/javascript" src="popupdiv.js"></script> -->
! 12: <script type="text/javascript" src="popupwin.js"></script>
! 13:
! 14: <!-- load the TableOperations plugin files -->
! 15: <script type="text/javascript" src="plugins/TableOperations/table-operations.js"></script>
! 16: <script type="text/javascript" src="plugins/TableOperations/lang/en.js"></script>
! 17:
! 18: <style type="text/css">
! 19: @import url(htmlarea.css);
! 20:
! 21: html, body {
! 22: font-family: Verdana,sans-serif;
! 23: background-color: #fea;
! 24: color: #000;
! 25: }
! 26: a:link, a:visited { color: #00f; }
! 27: a:hover { color: #048; }
! 28: a:active { color: #f00; }
! 29:
! 30: textarea { background-color: #fff; border: 1px solid 00f; }
! 31: </style>
! 32:
! 33: <script type="text/javascript">
! 34: var editor = null;
! 35: function initEditor() {
! 36: // create an editor for the "ta" textbox
! 37: editor = new HTMLArea("ta");
! 38:
! 39: // register the TableOperations plugin with our editor
! 40: editor.registerPlugin("TableOperations");
! 41:
! 42: editor.generate();
! 43: return false;
! 44: }
! 45:
! 46: function insertHTML() {
! 47: var html = prompt("Enter some HTML code here");
! 48: if (html) {
! 49: editor.insertHTML(html);
! 50: }
! 51: }
! 52: function highlight() {
! 53: editor.surroundHTML('<span style="background-color: yellow">', '</span>');
! 54: }
! 55: </script>
! 56:
! 57: </head>
! 58:
! 59: <!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
! 60: customizing the editor. It's the easiest way! :) -->
! 61: <body onload="initEditor()">
! 62:
! 63: <h1>HTMLArea 3.0</h1>
! 64:
! 65: <p>A replacement for <code>TEXTAREA</code> elements. © <a
! 66: href="http://interactivetools.com">InteractiveTools.com</a>, 2003.</p>
! 67:
! 68: <p>Page that demonstrates the additional features of the
! 69: <tt>TableOperations</tt> plugin (sponsored by <a
! 70: href="http://www.bloki.com">Zapatec Inc.</a>).</p>
! 71:
! 72: <form action="test.cgi" method="post" id="edit" name="edit">
! 73:
! 74: <textarea id="ta" name="ta" style="width:100%" rows="24" cols="80">
! 75:
! 76: <h1>Plugin: <tt>TableOperations</tt></h1>
! 77:
! 78: <p>This page exemplifies the table operations toolbar, provided by the
! 79: TableOperations plugin.</p>
! 80:
! 81: <p>Following there is a table.</p>
! 82:
! 83: <table border="1" style="border: 2px solid rgb(255, 0, 0); width: 80%; background-image: none; border-collapse: collapse; color: rgb(153, 102, 0); background-color: rgb(255, 255, 51);" align="center" cellspacing="2" cellpadding="1" summary="">
! 84: <caption>This <span style="font-weight: bold;">is</span> a table</caption>
! 85: <tbody>
! 86: <tr style="border-style: none; background-image: none; background-color: rgb(255, 255, 153);" char="." align="left" valign="middle"> <td>1.1</td> <td>1.2</td> <td>1.3</td> <td>1.4</td> </tr>
! 87: <tr> <td>2.1</td> <td style="border: 1px solid rgb(51, 51, 255); background-image: none; background-color: rgb(102, 255, 255); color: rgb(0, 0, 51);" char="." align="left" valign="middle">2.2</td> <td>2.3</td> <td>2.4</td> </tr>
! 88: <tr> <td>3.1</td> <td>3.2</td> <td style="border: 2px dashed rgb(51, 204, 102); background-image: none; background-color: rgb(102, 255, 153); color: rgb(0, 51, 0);" char="." align="left" valign="middle">3.3</td> <td>3.4</td> </tr>
! 89: <tr> <td style="background-color: rgb(255, 204, 51);">4.1</td> <td style="background-color: rgb(255, 204, 51);">4.2</td> <td style="background-color: rgb(255, 204, 51);">4.3</td> <td style="background-color: rgb(255, 204, 51);">4.4</td> </tr>
! 90: </tbody>
! 91: </table>
! 92:
! 93: <p>Text after the table</p>
! 94:
! 95: </textarea>
! 96:
! 97: <p />
! 98:
! 99: <input type="submit" name="ok" value=" submit " />
! 100: <input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
! 101: <input type="button" name="hil" value=" highlight text " onclick="return highlight();" />
! 102:
! 103: <a href="javascript:mySubmit()">submit</a>
! 104:
! 105: <script type="text/javascript">
! 106: function mySubmit() {
! 107: // document.edit.save.value = "yes";
! 108: document.edit.onsubmit(); // workaround browser bugs.
! 109: document.edit.submit();
! 110: };
! 111: </script>
! 112:
! 113: </form>
! 114:
! 115: </body>
! 116: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>