]> git.immae.eu Git - perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git/blob - sources/plugins/clipboard/dev/dnd.html
Upgrade to 4.5.7 and add some plugin
[perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git] / sources / plugins / clipboard / dev / dnd.html
1 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2003-2016, 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>Manual test for #11460</title>
10 <script src="../../../ckeditor.js"></script>
11 <script src="../../../dev/console/console.js"></script>
12 <script src="../../../plugins/clipboard/dev/console.js"></script>
13 <link rel="stylesheet" href="../../../samples/old/sample.css">
14 <style type="text/css">
15 h2 {
16 margin: 10px 0px 4px 0px;
17 padding: 0;
18 font-size: 14px;
19 }
20 h3 {
21 margin: 5px 0px 2px 0px;
22 padding: 0;
23 font-size: 12px;
24 }
25 </style>
26 </head>
27 <body>
28 <h1 class="samples">
29 Manual test for #11460
30 </h1>
31 <h2>Description (<a href="javascript:hideshow('description');">hide/show</a>)</h2>
32 <div id="description" class="description">
33 <p>Test internal D&amp;D in the editor, dropping content from an external source (helpers, MS Word) and D&amp;D between editors. Keep in mind that internal D&amp;D is the most complex operation because editor have to handle two ranges at the same time.</p>
34 <h3>Expected behavior:</h3>
35 <ul>
36 <li>proper drop position,</li>
37 <li>in the internal and cross editor D&amp;D: dragged content should be removed,</li>
38 <li>dropped content should be (more less) the same as dragged content,</li>
39 <li>paste event should be fired,</li>
40 <li>undo should work properly (one undo operation for one D&amp;D),</li>
41 <li>no crashes, nor errors,</li>
42 </ul>
43 <h3>Drag scenarios:</h3>
44 <ul>
45 <li>drag simple text,</li>
46 <li>drag table cell/cells,</li>
47 <li>drag link,</li>
48 <li>drag helpers textarea content,</li>
49 <li>drag helpers html content,</li>
50 <li>drag content from MS Word.</li>
51 </ul>
52 <h3>Drop scenarios:</h3>
53 <ul>
54 <li>drop in the different paragraph (before and after),</li>
55 <li>drop in the same paragraph (before and after),</li>
56 <li>drop in the same text node (before and after),</li>
57 <li>drop between text lines,</li>
58 <li>drop on the whitespace next to the header,</li>
59 <li>drop on the whitespace on the left side from the quote,</li>
60 <li>drop into a cell.</li>
61 </ul>
62 <h3>Known issues (not part of this ticket):</h3>
63 <ul>
64 <li>because of <a href="http://dev.ckeditor.com/ticket/11636">#11636</a> dragged content is not correct in some cases (e.g. when you drag part of the link),</li>
65 <li>drag position needs clean up after D&amp;D (e.g. remove empty paragraphs, fix table),</li>
66 <li>drop position needs clean up after D&amp;D (e.g. add spaces before/after dropped content, apply parents styles, break paragraph when one paragraph is dropped at the end to the other paragraph),</li>
67 <li>in the external D&amp;D: Chrome add plenty of addition tags.</li>
68 </ul>
69 </div>
70 <div>
71 <h2>Helpers (<a href="javascript:hideshow('helpers');">hide/show</a>)</h2>
72 <div id="helpers">
73 <textarea style="width:49%; height:50px; float: left;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo vulputate tempor. Sed <b>at</b> elit.</textarea>
74 <div style="width:49%; height:50px; float: right;">
75 Lorem ipsum <b>dolor</b> sit <i>amet</i>, consectetur adipiscing elit. In commodo vulputate tempor. Sed &lt;b&gt;at elit&lt;/b&gt; vel ligula mollis aliquet a ac odio.
76 <pre>
77 Aenean cursus egestas ipsum.
78 </pre>
79 </div>
80 <div style="clear:both;"></div>
81 </div>
82 </div>
83 <div>
84 <h2>Classic editor (<a href="javascript:hideshow('classic-editor');">hide/show</a>)</h2>
85 <div id="classic-editor">
86 <textarea cols="80" id="classic" name="classic" rows="10">
87 &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;../../../samples/assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, 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.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&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=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &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; &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; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#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=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&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=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
88 </textarea>
89 </div>
90 </div>
91 <div>
92 <h2>Inline editor (<a href="javascript:hideshow('inline');">hide/show</a>)</h2>
93 <div id="inline" contenteditable="true">
94 <h1><img alt="Saturn V carrying Apollo 11" class="right" src="../../../samples/assets/sample.jpg" /> Apollo 11</h1>
95
96 <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>
97
98 <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>
99
100 <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
101
102 <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
103
104 <blockquote>
105 <p>One small step for [a] man, one giant leap for mankind.</p>
106 </blockquote>
107
108 <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>
109
110 <blockquote>
111 <p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
112 </blockquote>
113
114 <h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
115
116 <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;">
117 <caption><strong>Mission crew</strong></caption>
118 <thead>
119 <tr>
120 <th scope="col">Position</th>
121 <th scope="col">Astronaut</th>
122 </tr>
123 </thead>
124 <tbody>
125 <tr>
126 <td>Commander</td>
127 <td>Neil A. Armstrong</td>
128 </tr>
129 <tr>
130 <td>Command Module Pilot</td>
131 <td>Michael Collins</td>
132 </tr>
133 <tr>
134 <td>Lunar Module Pilot</td>
135 <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td>
136 </tr>
137 </tbody>
138 </table>
139
140 <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>
141
142 <ol>
143 <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
144 <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
145 <li><strong>Lunar Module</strong> for landing on the Moon.</li>
146 </ol>
147
148 <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>
149
150 <hr />
151 <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
152 </div>
153 </div>
154 <script type="text/javascript">
155 CKEDITOR.disableAutoInline = true;
156
157 function hideshow( id ) {
158 var element = CKEDITOR.document.getById( id );
159
160 if( element.getStyle( 'display' ) == 'none' )
161 element.show();
162 else
163 element.hide();
164 }
165
166 CKEDITOR.replace( 'classic' );
167 CKEDITOR.inline( 'inline' );
168
169 CKCONSOLE.addEventPanel( 'dragstart', [ '$', 'target', 'dataTransfer' ] );
170 CKCONSOLE.addEventPanel( 'dragend', [ '$', 'target', 'dataTransfer' ] );
171 CKCONSOLE.addEventPanel( 'drop',
172 [ '$', 'target', 'dataTransfer', 'dragRange', 'dropRange' ] );
173
174 CKCONSOLE.create( 'dragstart', { editor: 'classic' } );
175 CKCONSOLE.create( 'drop', { editor: 'classic' } );
176 CKCONSOLE.create( 'paste', { editor: 'classic' } );
177 CKCONSOLE.create( 'dragend', { editor: 'classic' } );
178
179 CKCONSOLE.create( 'dragstart', { editor: 'inline' } );
180 CKCONSOLE.create( 'drop', { editor: 'inline' } );
181 CKCONSOLE.create( 'paste', { editor: 'inline' } );
182 CKCONSOLE.create( 'dragend', { editor: 'inline' } );
183 </script>
184 </body>
185 </html>