Ticket #3934: 3934_TC.html

File 3934_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">non-paragraph <p>paragraph</p>
18                                </textarea>
19                                <script type="text/javascript">
20                                //<![CDATA[
21
22                                        // This call can be placed at any point after the
23                                        // <textarea>, or inside a <head><script> in a
24                                        // window.onload event handler.
25
26                                        // Replace the <textarea id="editor"> with an CKEditor
27                                        // instance, using default configurations.
28                                        CKEDITOR.replace( 'editor1' , {
29                                                enterMode : CKEDITOR.ENTER_BR
30                                        });
31
32                                //]]>
33                                </script>
34                        </p>
35                        <input type="submit" value="Submit" />
36                </form>
37        </div>
38        <div id="code">
39                <pre>
40&lt;form action=""&gt;
41  &lt;p&gt;
42    &lt;label for="editor1"&gt;
43      Editor 1:&lt;/label&gt;&lt;br /&gt;
44    &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;
45    &lt;script type="text/javascript"&gt;
46    //&lt;![CDATA[
47
48      <b>CKEDITOR.replace( 'editor1' );</b>
49
50    //]]&gt;
51    &lt;/script&gt;
52  &lt;/p&gt;
53  &lt;p&gt;
54    &lt;input type="submit" value="Submit" /&gt;
55  &lt;/p&gt;
56&lt;/form&gt;
57</pre>
58        </div>
59</body>
60</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy