source: trunk/phpgwapi/js/htmlarea/example-spell-checker.html @ 2

Revision 2, 3.8 KB checked in by niltonneto, 17 years ago (diff)

Removida todas as tags usadas pelo CVS ($Id, $Source).
Primeira versão no CVS externo.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
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 SpellChecker plugin files -->
15<script type="text/javascript" src="plugins/SpellChecker/spell-checker.js"></script>
16<script type="text/javascript" src="plugins/SpellChecker/lang/en.js"></script>
17
18<style type="text/css">
19@import url(htmlarea.css);
20
21html, body {
22  font-family: Verdana,sans-serif;
23  background-color: #fea;
24  color: #000;
25}
26a:link, a:visited { color: #00f; }
27a:hover { color: #048; }
28a:active { color: #f00; }
29
30textarea { background-color: #fff; border: 1px solid 00f; }
31</style>
32
33<script type="text/javascript">
34var editor = null;
35function initEditor() {
36  // create an editor for the "ta" textbox
37  editor = new HTMLArea("ta");
38
39  // register the SpellChecker plugin
40  editor.registerPlugin("SpellChecker");
41
42  editor.generate();
43  return false;
44}
45
46function insertHTML() {
47  var html = prompt("Enter some HTML code here");
48  if (html) {
49    editor.insertHTML(html);
50  }
51}
52function 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.  &copy; <a
66href="http://interactivetools.com">InteractiveTools.com</a>, 2003.</p>
67
68<p>Plugins:
69      <tt>SpellChecker</tt> (sponsored by <a
70        href="http://americanbible.org">American Bible Society</a>).
71</p>
72
73<form action="test.cgi" method="post" id="edit" name="edit">
74
75<textarea id="ta" name="ta" style="width:100%" rows="24" cols="80">
76
77<h1>The <tt>SpellChecker</tt> plugin</h1>
78
79      <p>This file deminstrates the <tt>SpellChecker</tt> plugin of
80      HTMLArea.  To inwoke the spell checkert you need to press the
81      <em>spell-check</em> buton in the toolbar.</p>
82
83      <p>The spell-checker uses a serverside script written in Perl.  The
84        Perl script calls <a href="http://aspell.net">aspell</a> for any
85        word in the text and reports wordz that aren't found in the
86        dyctionari.</p>
87
88      <p>The document that yu are reading now <b>intentionaly</b> containes
89        some errorz, so that you have something to corect ;-)</p>
90
91      <p>Credits for the <tt>SpellChecker</tt> plugin go to:</p>
92
93      <ul>
94
95        <li><a href="http://aspell.net">Aspell</a> -- spell
96          checker</li>
97
98        <li>The <a href="http://perl.org">Perl</a> programming language</li>
99
100        <li><tt><a
101              href="http://cpan.org/modules/by-module/Text/Text-Aspell-0.02.readme">Text::Aspell</a></tt>
102          -- Perl interface to Aspell</li>
103
104        <li><a href="http://americanbible.org">American Bible Society</a> --
105          for sponsoring the <tt>SpellChecker</tt> plugin for
106          <tt>HTMLArea</tt></li>
107
108        <li><a href="http://students.infoiasi.ro/~mishoo/">Your humble servant</a> for
109          implementing it ;-)</li>
110
111      </ul>
112
113</textarea>
114
115<p />
116
117<input type="submit" name="ok" value="  submit  " />
118<input type="button" name="ins" value="  insert html  " onclick="return insertHTML();" />
119<input type="button" name="hil" value="  highlight text  " onclick="return highlight();" />
120
121<a href="javascript:mySubmit()">submit</a>
122
123<script type="text/javascript">
124function mySubmit() {
125// document.edit.save.value = "yes";
126document.edit.onsubmit(); // workaround browser bugs.
127document.edit.submit();
128};
129</script>
130
131</form>
132
133</body>
134</html>
Note: See TracBrowser for help on using the repository browser.