3 Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
4 For licensing, see LICENSE.md or http://ckeditor.com/license
9 <title>Replace Textarea with Inline Editor
— CKEditor Sample
</title>
10 <script src=
"../ckeditor.js"></script>
11 <link href=
"sample.css" rel=
"stylesheet">
14 /* Style the CKEditor element to look like a textfield */
21 border:
1px solid gray;
22 -webkit-appearance: textfield;
29 <a href=
"index.html">CKEditor Samples
</a> » Replace Textarea with Inline Editor
31 <div class=
"description">
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.
38 //
"article-body" is the name of a textarea element.
39 var editor = CKEDITOR.inline( 'article-body' );
42 <form action=
"sample_posteddata.php" method=
"post">
43 <h2>This is a sample form with some fields
</h2>
46 <input type=
"text" name=
"title" value=
"Sample Form"></p>
48 Article Body (Textarea converted to CKEditor):
<br>
49 <textarea name=
"article-body" style=
"height: 200px">
50 <h2
>Technical details
<a
id=
"tech-details" name=
"tech-details"></a
></h2
>
52 <table
align=
"right" border=
"1" bordercolor=
"#ccc" cellpadding=
"5" cellspacing=
"0" style=
"border-collapse:collapse;margin:10px 0 10px 15px;">
53 <caption
><strong
>Mission crew
</strong
></caption
>
56 <th
scope=
"col">Position
</th
>
57 <th
scope=
"col">Astronaut
</th
>
62 <td
>Commander
</td
>
63 <td
>Neil A. Armstrong
</td
>
66 <td
>Command Module Pilot
</td
>
67 <td
>Michael Collins
</td
>
70 <td
>Lunar Module Pilot
</td
>
71 <td
>Edwin
"Buzz
" E. Aldrin, Jr.
</td
>
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
>
79 <li
><strong
>Command Module
</strong
> with a cabin for the three astronauts which was the only part which landed back on Earth
</li
>
80 <li
><strong
>Service Module
</strong
> which supported the Command Module with propulsion, electrical power, oxygen and water
</li
>
81 <li
><strong
>Lunar Module
</strong
> for landing on the Moon.
</li
>
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
>
87 <p
style=
"text-align: right;"><small
>Source:
<a
href=
"http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org
</a
></small
></p
>
91 <input type=
"submit" value=
"Submit">
96 CKEDITOR.inline( 'article-body' );
100 <p contenteditable=
"true">
101 CKEditor - The text editor for the Internet -
<a class=
"samples" href=
"http://ckeditor.com/">
102 http://ckeditor.com
</a>
105 Copyright
© 2003-
2014,
<a class=
"samples" href=
"http://cksource.com/">CKSource
</a>
106 - Frederico Knabben. All rights reserved.