Projet

Général

Profil

Paste
Télécharger (4,83 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / libraries / ckeditor-4.9.2-full / samples / old / inlinetextarea.html @ b986a83e

1 85ad3d82 Assos Assos
<!DOCTYPE html>
2
<!--
3 b986a83e Florent Torregrosa
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
4
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
5 85ad3d82 Assos Assos
-->
6
<html>
7
<head>
8
        <meta charset="utf-8">
9 d69c481e Florent Torregrosa
        <title>Replace Textarea with Inline Editor &mdash; CKEditor Sample</title>
10 0aee3c58 Assos Assos
        <script src="../../ckeditor.js"></script>
11 85ad3d82 Assos Assos
        <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 0aee3c58 Assos Assos
        <div class="warning deprecated">
32 b986a83e Florent Torregrosa
                This sample is not maintained anymore. Check out its <a href="https://sdk.ckeditor.com/samples/inline.html">brand new version in CKEditor SDK</a>.
33 0aee3c58 Assos Assos
        </div>
34 85ad3d82 Assos Assos
        <div class="description">
35
                <p>
36
                        You can also create an inline editor from a <code>textarea</code>
37
                        element. In this case the <code>textarea</code> will be replaced
38
                        by a <code>div</code> element with inline editing enabled.
39
                </p>
40
<pre class="samples">
41
// "article-body" is the name of a textarea element.
42
var editor = CKEDITOR.inline( 'article-body' );
43
</pre>
44
        </div>
45
        <form action="sample_posteddata.php" method="post">
46
                <h2>This is a sample form with some fields</h2>
47
                <p>
48
                        Title:<br>
49
                        <input type="text" name="title" value="Sample Form"></p>
50
                <p>
51
                        Article Body (Textarea converted to CKEditor):<br>
52
                        <textarea name="article-body" style="height: 200px">
53
                                &lt;h2&gt;Technical details &lt;a id="tech-details" name="tech-details"&gt;&lt;/a&gt;&lt;/h2&gt;
54
55
                                &lt;table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"&gt;
56
                                        &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt;
57
                                        &lt;thead&gt;
58
                                        &lt;tr&gt;
59
                                                &lt;th scope="col"&gt;Position&lt;/th&gt;
60
                                                &lt;th scope="col"&gt;Astronaut&lt;/th&gt;
61
                                        &lt;/tr&gt;
62
                                        &lt;/thead&gt;
63
                                        &lt;tbody&gt;
64
                                        &lt;tr&gt;
65
                                                &lt;td&gt;Commander&lt;/td&gt;
66
                                                &lt;td&gt;Neil A. Armstrong&lt;/td&gt;
67
                                        &lt;/tr&gt;
68
                                        &lt;tr&gt;
69
                                                &lt;td&gt;Command Module Pilot&lt;/td&gt;
70
                                                &lt;td&gt;Michael Collins&lt;/td&gt;
71
                                        &lt;/tr&gt;
72
                                        &lt;tr&gt;
73
                                                &lt;td&gt;Lunar Module Pilot&lt;/td&gt;
74
                                                &lt;td&gt;Edwin &quot;Buzz&quot; E. Aldrin, Jr.&lt;/td&gt;
75
                                        &lt;/tr&gt;
76
                                        &lt;/tbody&gt;
77
                                &lt;/table&gt;
78
79
                                &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;
80
81
                                &lt;ol&gt;
82
                                        &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;
83
                                        &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;
84
                                        &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt;
85
                                &lt;/ol&gt;
86
87
                                &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;
88
89
                                &lt;hr /&gt;
90
                                &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;
91
                        </textarea>
92
                </p>
93
                <p>
94
                        <input type="submit" value="Submit">
95
                </p>
96
        </form>
97
98
        <script>
99
                CKEDITOR.inline( 'article-body' );
100
        </script>
101
        <div id="footer">
102
                <hr>
103 d69c481e Florent Torregrosa
                <p>
104 b986a83e Florent Torregrosa
                        CKEditor - The text editor for the Internet - <a class="samples" href="https://ckeditor.com/">
105
                                https://ckeditor.com</a>
106 85ad3d82 Assos Assos
                </p>
107
                <p id="copy">
108 b986a83e Florent Torregrosa
                        Copyright &copy; 2003-2018, <a class="samples" href="https://cksource.com/">CKSource</a>
109 85ad3d82 Assos Assos
                        - Frederico Knabben. All rights reserved.
110
                </p>
111
        </div>
112
</body>
113
</html>