Ticket #3933: 3933_TC.html

File 3933_TC.html, 1.8 KB (added by Garry Yao, 15 years ago)

Sample page for reproducing

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<!--
3Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.html or http://ckeditor.com/license
5-->
6<html xmlns="http://www.w3.org/1999/xhtml">
7<head>
8        <title>Replace Textarea by Code - CKEditor Sample</title>
9        <script type="text/javascript" src="sample.js"></script>
10</head>
11<body>
12        <div id="html">
13                <form action="sample_posteddata.php" method="post">
14                        <p>
15                                <label for="editor1">
16                                        Editor 1:</label><br />
17                                <textarea id="editor1" name="editor1" rows="10" cols="80"><table><tr><td>table</td></tr></table></textarea>
18                                <script type="text/javascript">
19                                //<![CDATA[
20
21                                        // This call can be placed at any point after the
22                                        // <textarea>, or inside a <head><script> in a
23                                        // window.onload event handler.
24
25                                        // Replace the <textarea id="editor"> with an CKEditor
26                                        // instance, using default configurations.
27                                        CKEDITOR.replace( 'editor1' , {
28                                                enterMode : CKEDITOR.ENTER_BR
29                                        });
30
31                                //]]>
32                                </script>
33                        </p>
34                        <input type="submit" value="Submit" />
35                </form>
36        </div>
37        <div id="code">
38                <pre>
39&lt;form action=""&gt;
40  &lt;p&gt;
41    &lt;label for="editor1"&gt;
42      Editor 1:&lt;/label&gt;&lt;br /&gt;
43    &lt;textarea <b>name="editor1"</b> rows="10" cols="80"&gt;&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;&lt;/textarea&gt;
44    &lt;script type="text/javascript"&gt;
45    //&lt;![CDATA[
46
47      <b>CKEDITOR.replace( 'editor1' );</b>
48
49    //]]&gt;
50    &lt;/script&gt;
51  &lt;/p&gt;
52  &lt;p&gt;
53    &lt;input type="submit" value="Submit" /&gt;
54  &lt;/p&gt;
55&lt;/form&gt;
56</pre>
57        </div>
58</body>
59</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy