Ticket #11902: inlinebycode3.html

File inlinebycode3.html, 6.1 KB (added by Jakub Ś, 11 years ago)
Line 
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8        <meta charset="utf-8">
9        <title>Inline Editing by Code &mdash; CKEditor Sample</title>
10        <script src="../ckeditor.js"></script>
11        <link href="sample.css" rel="stylesheet">
12        <style>
13
14                #editable
15                {
16                        padding: 10px;
17                        float: left;
18                }
19
20        </style>
21</head>
22<body>
23        <h1 class="samples">
24                <a href="index.html">CKEditor Samples</a> &raquo; Inline Editing by Code
25        </h1>
26        <div class="description">
27                <p>
28                        This sample shows how to create an inline editor instance of CKEditor. It is created
29                        with a JavaScript call using the following code:
30                </p>
31<pre class="samples">
32// This property tells CKEditor to not activate every element with contenteditable=true element.
33CKEDITOR.disableAutoInline = true;
34
35var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );
36</pre>
37                <p>
38                        Note that <code>editable</code> in the code above is the <code>id</code>
39                        attribute of the <code>&lt;div&gt;</code> element to be converted into an inline instance.
40                </p>
41        </div>
42        <p id="editable2" contenteditable="true">
43                                some text<strong> more text</strong> text.
44                        </p>
45       
46        <div id="editable" contenteditable="true">
47                <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg" /> Apollo 11</h1>
48
49                <p><b>Apollo 11</b> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
50
51                <p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
52
53                <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
54
55                <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
56
57                <blockquote>
58                        <p>One small step for [a] man, one giant leap for mankind.</p>
59                </blockquote>
60
61                <p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p>
62
63                <blockquote>
64                        <p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
65                </blockquote>
66
67                <h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
68
69                <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;">
70                        <caption><strong>Mission crew</strong></caption>
71                        <thead>
72                        <tr>
73                                <th scope="col">Position</th>
74                                <th scope="col">Astronaut</th>
75                        </tr>
76                        </thead>
77                        <tbody>
78                        <tr>
79                                <td>Commander</td>
80                                <td>Neil A. Armstrong</td>
81                        </tr>
82                        <tr>
83                                <td>Command Module Pilot</td>
84                                <td>Michael Collins</td>
85                        </tr>
86                        <tr>
87                                <td>Lunar Module Pilot</td>
88                                <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td>
89                        </tr>
90                        </tbody>
91                </table>
92
93                <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>&#39;s Apollo program. The Apollo spacecraft had three parts:</p>
94
95                <ol>
96                        <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
97                        <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
98                        <li><strong>Lunar Module</strong> for landing on the Moon.</li>
99                </ol>
100
101                <p>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 <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>
102
103                <hr />
104                <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
105        </div>
106
107        <script>
108                // We need to turn off the automatic editor creation first.
109                CKEDITOR.disableAutoInline = true;
110
111                var editor = CKEDITOR.inline( 'editable', {
112                        extraPlugins: 'mathjax'
113                } );
114               
115                CKEDITOR.inline( 'editable2', {
116                        extraPlugins: 'mathjax'
117                }  );
118        </script>
119        <div id="footer">
120                <hr>
121                <p contenteditable="true">
122                        CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
123                                http://ckeditor.com</a>
124                </p>
125                <p id="copy">
126                        Copyright &copy; 2003-2014, <a class="samples" href="http://cksource.com/">CKSource</a>
127                        - Frederico Knabben. All rights reserved.
128                </p>
129        </div>
130</body>
131</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy