blob: 220fb1d15b5e47a8e0defbc7823100521d47f3eb [file] [log] [blame]
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. The ASF licenses this file to You
under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License. For additional information regarding
copyright in this work, please see the NOTICE file in the top level
directory of this distribution.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<title>Cross-Browser Rich Text Editor</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="PageURL" content="" />
<meta name="PageTitle" content="Cross-Browser Rich Text Editor (Multiple Demo)" />
<script language="JavaScript" type="text/javascript" src="html2xhtml.js"></script>
<!-- To decrease bandwidth, use richtext_compressed.js instead of richtext.js //-->
<script language="JavaScript" type="text/javascript" src="richtext.js"></script>
<h2>Cross-Browser Rich Text Editor</h2>
<p><a href=";lngWId=2" target="_blank"><img src="/images/PscContestWinner.jpg" height="88" width="409" alt="PscContestWinner" border="0"></a></p>
<p>The cross-browser rich-text editor (RTE) is based on the <a href="" target="_blank">designMode()</a> functionality introduced in Internet Explorer 5, and implemented in Mozilla 1.3+ using the <a href="" target="_blank">Mozilla Rich Text Editing API</a>. The cross-browser rich-text editor now includes <b>table support</b> (as of 2/10/2005) as well as an option to generate <b>xhtml-compliant code</b> (as of 2/24/2005).</p>
<p><b>This code is public domain.</b> Redistribution and use of this code, with or without modification, is permitted.</p>
<p>For frequently asked question and support, please visit <a href=""></a></p>
<p><b>Requires:</b> IE5+/<a href="">Mozilla</a> 1.3+/<a href="" target="_blank">Mozilla Firebird/Firefox</a> 0.6.1+/<a href="" target="_blank">Netscape</a> 7.1+, or any other browser that fully supports designMode() for all rich-text features to function properly. All other browsers will display a standard textarea box instead.</p>
<p><b>Source:</b> <a href=""></a>, <a href="rte.tar.gz">rte.tar.gz</a><br>
Included in the zip are <a href="demo.htm">HTML</a>, <a href="demo.asp">ASP</a>, and <a href="demo.php">PHP</a> demos. Also, here is an html demo showing <a href="multi.htm">multiple RTEs</a> on one page.</p>
<p><b>Change Log:</b> <a href="changelog.txt">changelog.txt</a></p>
<p><b>If you feel that the work I've done has value to you,</b> I would greatly appreciate a paypal donation (click button below). Another way you can help me out is to <a href="" target="_blank">sign up for a free flat screen</a>, to help me get mine. Again, I am very grateful for any and all contributions.</p>
<form action="" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="lc" value="US">
<input type="image" src="/images/paypal_donate.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<!-- START Demo Code -->
<form name="RTEDemo" action="multi.htm" method="post" onsubmit="return submitForm();">
<script language="JavaScript" type="text/javascript">
function submitForm() {
//make sure hidden and iframe values are in sync before submitting form
//to sync only 1 rte, use updateRTE(rte)
//to sync all rtes, use updateRTEs
alert("rte1 = " + document.RTEDemo.rte1.value);
alert("rte2 = " + document.RTEDemo.rte2.value);
alert("rte3 = " + document.RTEDemo.rte3.value);
//change the following line to true to submit form
return false;
//Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML)
initRTE("images/", "", "", true);
<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>
<script language="JavaScript" type="text/javascript">
//Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)
writeRichText('rte1', 'here&#39;s the "<em>preloaded</em> <b>content</b>"', 520, 200, true, false);
writeRichText('rte2', 'preloaded <b>text</b>', 560, 100, false, false);
writeRichText('rte3', 'preloaded <b>text</b>', 450, 100, true, true);
<p>Click submit to show the value of the text box.</p>
<p><input type="submit" name="submit" value="Submit"></p>
<!-- END Demo Code -->