bugfixes et cosmétique.
[ckeditor.git] / skins / ckeditor / samples / inlinetextarea.html
1 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
4 For licensing, see LICENSE.md or http://ckeditor.com/license
5 -->
6 <html>
7 <head>
8 <meta charset="utf-8">
9 <title>Replace Textarea with Inline Editor &mdash; CKEditor Sample</title>
10 <script src="../ckeditor.js"></script>
11 <link href="sample.css" rel="stylesheet">
12 <style>
13
14 /* Style the CKEditor element to look like a textfield */
15 .cke_textarea_inline
16 {
17 padding: 10px;
18 height: 200px;
19 overflow: auto;
20
21 border: 1px solid gray;
22 -webkit-appearance: textfield;
23 }
24
25 </style>
26 </head>
27 <body>
28 <h1 class="samples">
29 <a href="index.html">CKEditor Samples</a> &raquo; Replace Textarea with Inline Editor
30 </h1>
31 <div class="description">
32 <p>
33 You can also create an inline editor from a <code>textarea</code>
34 element. In this case the <code>textarea</code> will be replaced
35 by a <code>div</code> element with inline editing enabled.
36 </p>
37 <pre class="samples">
38 // "article-body" is the name of a textarea element.
39 var editor = CKEDITOR.inline( 'article-body' );
40 </pre>
41 </div>
42 <form action="sample_posteddata.php" method="post">
43 <h2>This is a sample form with some fields</h2>
44 <p>
45 Title:<br>
46 <input type="text" name="title" value="Sample Form"></p>
47 <p>
48 Article Body (Textarea converted to CKEditor):<br>
49 <textarea name="article-body" style="height: 200px">
50 &lt;h2&gt;Technical details &lt;a id="tech-details" name="tech-details"&gt;&lt;/a&gt;&lt;/h2&gt;
51
52 &lt;table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"&gt;
53 &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt;
54 &lt;thead&gt;
55 &lt;tr&gt;
56 &lt;th scope="col"&gt;Position&lt;/th&gt;
57 &lt;th scope="col"&gt;Astronaut&lt;/th&gt;
58 &lt;/tr&gt;
59 &lt;/thead&gt;
60 &lt;tbody&gt;
61 &lt;tr&gt;
62 &lt;td&gt;Commander&lt;/td&gt;
63 &lt;td&gt;Neil A. Armstrong&lt;/td&gt;
64 &lt;/tr&gt;
65 &lt;tr&gt;
66 &lt;td&gt;Command Module Pilot&lt;/td&gt;
67 &lt;td&gt;Michael Collins&lt;/td&gt;
68 &lt;/tr&gt;
69 &lt;tr&gt;
70 &lt;td&gt;Lunar Module Pilot&lt;/td&gt;
71 &lt;td&gt;Edwin &quot;Buzz&quot; E. Aldrin, Jr.&lt;/td&gt;
72 &lt;/tr&gt;
73 &lt;/tbody&gt;
74 &lt;/table&gt;
75
76 &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center"&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href="http://en.wikipedia.org/wiki/NASA" title="NASA"&gt;NASA&lt;/a&gt;&#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt;
77
78 &lt;ol&gt;
79 &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt;
80 &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt;
81 &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt;
82 &lt;/ol&gt;
83
84 &lt;p&gt;After being sent to the Moon by the Saturn V&#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis"&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean"&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt;
85
86 &lt;hr /&gt;
87 &lt;p style="text-align: right;"&gt;&lt;small&gt;Source: &lt;a href="http://en.wikipedia.org/wiki/Apollo_11"&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
88 </textarea>
89 </p>
90 <p>
91 <input type="submit" value="Submit">
92 </p>
93 </form>
94
95 <script>
96 CKEDITOR.inline( 'article-body' );
97 </script>
98 <div id="footer">
99 <hr>
100 <p contenteditable="true">
101 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
102 http://ckeditor.com</a>
103 </p>
104 <p id="copy">
105 Copyright &copy; 2003-2014, <a class="samples" href="http://cksource.com/">CKSource</a>
106 - Frederico Knabben. All rights reserved.
107 </p>
108 </div>
109 </body>
110 </html>