]> git.immae.eu Git - perso/Immae/Projets/packagist/ludivine-ckeditor-component.git/blame - sources/plugins/clipboard/dev/dnd.html
Update to 4.7.3
[perso/Immae/Projets/packagist/ludivine-ckeditor-component.git] / sources / plugins / clipboard / dev / dnd.html
CommitLineData
c63493c8
IB
1<!DOCTYPE html>\r
2<!--\r
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\r
4For licensing, see LICENSE.md or http://ckeditor.com/license\r
5-->\r
6<html>\r
7<head>\r
8 <meta charset="utf-8">\r
1794320d 9 <title>Manual test for http://dev.ckeditor.com/ticket/11460</title>\r
c63493c8
IB
10 <script src="../../../ckeditor.js"></script>\r
11 <script src="../../../dev/console/console.js"></script>\r
12 <script src="../../../plugins/clipboard/dev/console.js"></script>\r
13 <link rel="stylesheet" href="../../../samples/old/sample.css">\r
14 <style type="text/css">\r
15 h2 {\r
16 margin: 10px 0px 4px 0px;\r
17 padding: 0;\r
18 font-size: 14px;\r
19 }\r
20 h3 {\r
21 margin: 5px 0px 2px 0px;\r
22 padding: 0;\r
23 font-size: 12px;\r
24 }\r
25 </style>\r
26</head>\r
27<body>\r
28 <h1 class="samples">\r
29 Manual test for #11460\r
30 </h1>\r
31 <h2>Description (<a href="javascript:hideshow('description');">hide/show</a>)</h2>\r
32 <div id="description" class="description">\r
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>\r
34 <h3>Expected behavior:</h3>\r
35 <ul>\r
36 <li>proper drop position,</li>\r
37 <li>in the internal and cross editor D&amp;D: dragged content should be removed,</li>\r
38 <li>dropped content should be (more less) the same as dragged content,</li>\r
39 <li>paste event should be fired,</li>\r
40 <li>undo should work properly (one undo operation for one D&amp;D),</li>\r
41 <li>no crashes, nor errors,</li>\r
42 </ul>\r
43 <h3>Drag scenarios:</h3>\r
44 <ul>\r
45 <li>drag simple text,</li>\r
46 <li>drag table cell/cells,</li>\r
47 <li>drag link,</li>\r
48 <li>drag helpers textarea content,</li>\r
49 <li>drag helpers html content,</li>\r
50 <li>drag content from MS Word.</li>\r
51 </ul>\r
52 <h3>Drop scenarios:</h3>\r
53 <ul>\r
54 <li>drop in the different paragraph (before and after),</li>\r
55 <li>drop in the same paragraph (before and after),</li>\r
56 <li>drop in the same text node (before and after),</li>\r
57 <li>drop between text lines,</li>\r
58 <li>drop on the whitespace next to the header,</li>\r
59 <li>drop on the whitespace on the left side from the quote,</li>\r
60 <li>drop into a cell.</li>\r
61 </ul>\r
62 <h3>Known issues (not part of this ticket):</h3>\r
63 <ul>\r
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>\r
65 <li>drag position needs clean up after D&amp;D (e.g. remove empty paragraphs, fix table),</li>\r
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>\r
67 <li>in the external D&amp;D: Chrome add plenty of addition tags.</li>\r
68 </ul>\r
69 </div>\r
70 <div>\r
71 <h2>Helpers (<a href="javascript:hideshow('helpers');">hide/show</a>)</h2>\r
72 <div id="helpers">\r
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>\r
74 <div style="width:49%; height:50px; float: right;">\r
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.\r
76 <pre>\r
77Aenean cursus egestas ipsum.\r
78 </pre>\r
79 </div>\r
80 <div style="clear:both;"></div>\r
81 </div>\r
82 </div>\r
83 <div>\r
84 <h2>Classic editor (<a href="javascript:hideshow('classic-editor');">hide/show</a>)</h2>\r
85 <div id="classic-editor">\r
86 <textarea cols="80" id="classic" name="classic" rows="10">\r
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;\r
88 </textarea>\r
89 </div>\r
90 </div>\r
91 <div>\r
92 <h2>Inline editor (<a href="javascript:hideshow('inline');">hide/show</a>)</h2>\r
93 <div id="inline" contenteditable="true">\r
94 <h1><img alt="Saturn V carrying Apollo 11" class="right" src="../../../samples/assets/sample.jpg" /> Apollo 11</h1>\r
95\r
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>\r
97\r
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>\r
99\r
100 <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>\r
101\r
102 <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>\r
103\r
104 <blockquote>\r
105 <p>One small step for [a] man, one giant leap for mankind.</p>\r
106 </blockquote>\r
107\r
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>\r
109\r
110 <blockquote>\r
111 <p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>\r
112 </blockquote>\r
113\r
114 <h2>Technical details <a id="tech-details" name="tech-details"></a></h2>\r
115\r
116 <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;">\r
117 <caption><strong>Mission crew</strong></caption>\r
118 <thead>\r
119 <tr>\r
120 <th scope="col">Position</th>\r
121 <th scope="col">Astronaut</th>\r
122 </tr>\r
123 </thead>\r
124 <tbody>\r
125 <tr>\r
126 <td>Commander</td>\r
127 <td>Neil A. Armstrong</td>\r
128 </tr>\r
129 <tr>\r
130 <td>Command Module Pilot</td>\r
131 <td>Michael Collins</td>\r
132 </tr>\r
133 <tr>\r
134 <td>Lunar Module Pilot</td>\r
135 <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td>\r
136 </tr>\r
137 </tbody>\r
138 </table>\r
139\r
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>\r
141\r
142 <ol>\r
143 <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>\r
144 <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>\r
145 <li><strong>Lunar Module</strong> for landing on the Moon.</li>\r
146 </ol>\r
147\r
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>\r
149\r
150 <hr />\r
151 <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>\r
152 </div>\r
153 </div>\r
154 <script type="text/javascript">\r
155 CKEDITOR.disableAutoInline = true;\r
156\r
157 function hideshow( id ) {\r
158 var element = CKEDITOR.document.getById( id );\r
159\r
160 if( element.getStyle( 'display' ) == 'none' )\r
161 element.show();\r
162 else\r
163 element.hide();\r
164 }\r
165\r
166 CKEDITOR.replace( 'classic' );\r
167 CKEDITOR.inline( 'inline' );\r
168\r
169 CKCONSOLE.addEventPanel( 'dragstart', [ '$', 'target', 'dataTransfer' ] );\r
170 CKCONSOLE.addEventPanel( 'dragend', [ '$', 'target', 'dataTransfer' ] );\r
171 CKCONSOLE.addEventPanel( 'drop',\r
172 [ '$', 'target', 'dataTransfer', 'dragRange', 'dropRange' ] );\r
173\r
174 CKCONSOLE.create( 'dragstart', { editor: 'classic' } );\r
175 CKCONSOLE.create( 'drop', { editor: 'classic' } );\r
176 CKCONSOLE.create( 'paste', { editor: 'classic' } );\r
177 CKCONSOLE.create( 'dragend', { editor: 'classic' } );\r
178\r
179 CKCONSOLE.create( 'dragstart', { editor: 'inline' } );\r
180 CKCONSOLE.create( 'drop', { editor: 'inline' } );\r
181 CKCONSOLE.create( 'paste', { editor: 'inline' } );\r
182 CKCONSOLE.create( 'dragend', { editor: 'inline' } );\r
183 </script>\r
184</body>\r
185</html>\r