3 Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
\r
4 For licensing, see LICENSE.md or http://ckeditor.com/license
\r
8 <meta charset="utf-8">
\r
9 <title>Replace Textarea with Inline Editor — CKEditor Sample</title>
\r
10 <script src="../ckeditor.js"></script>
\r
11 <link href="sample.css" rel="stylesheet">
\r
14 /* Style the CKEditor element to look like a textfield */
\r
15 .cke_textarea_inline
\r
21 border: 1px solid gray;
\r
22 -webkit-appearance: textfield;
\r
28 <h1 class="samples">
\r
29 <a href="index.html">CKEditor Samples</a> » Replace Textarea with Inline Editor
\r
31 <div class="description">
\r
33 You can also create an inline editor from a <code>textarea</code>
\r
34 element. In this case the <code>textarea</code> will be replaced
\r
35 by a <code>div</code> element with inline editing enabled.
\r
37 <pre class="samples">
\r
38 // "article-body" is the name of a textarea element.
\r
39 var editor = CKEDITOR.inline( 'article-body' );
\r
42 <form action="sample_posteddata.php" method="post">
\r
43 <h2>This is a sample form with some fields</h2>
\r
46 <input type="text" name="title" value="Sample Form"></p>
\r
48 Article Body (Textarea converted to CKEditor):<br>
\r
49 <textarea name="article-body" style="height: 200px">
\r
50 <h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
\r
52 <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;">
\r
53 <caption><strong>Mission crew</strong></caption>
\r
56 <th scope="col">Position</th>
\r
57 <th scope="col">Astronaut</th>
\r
62 <td>Commander</td>
\r
63 <td>Neil A. Armstrong</td>
\r
66 <td>Command Module Pilot</td>
\r
67 <td>Michael Collins</td>
\r
70 <td>Lunar Module Pilot</td>
\r
71 <td>Edwin "Buzz" E. Aldrin, Jr.</td>
\r
76 <p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>'s Apollo program. The Apollo spacecraft had three parts:</p>
\r
79 <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
\r
80 <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
\r
81 <li><strong>Lunar Module</strong> for landing on the Moon.</li>
\r
84 <p>After being sent to the Moon by the Saturn V'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 <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. 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 <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
\r
87 <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
\r
91 <input type="submit" value="Submit">
\r
96 CKEDITOR.inline( 'article-body' );
\r
101 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
\r
102 http://ckeditor.com</a>
\r
105 Copyright © 2003-2014, <a class="samples" href="http://cksource.com/">CKSource</a>
\r
106 - Frederico Knabben. All rights reserved.
\r