Changes between Version 4 and Version 5 of Ticket #11526, comment 3
- Timestamp:
- Feb 12, 2014, 10:43:22 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11526, comment 3
v4 v5 1 = Testing environment =1 = 1. Testing environment = 2 2 I tested Drag & Drop and Copy & Paste I the following cases. You can find scripts used for testing in the attachment. 3 == HTML from outside of editable area3 === HTML from outside of editable area 4 4 Source HTML: 5 5 {{{ … … 8 8 <p>Aliquam <b>mi est</b>, interdum 9 9 }}} 10 == HTML from inside of editable area11 12 As above. 13 14 == Text from textarea10 === HTML from inside of editable area 11 12 As above. 13 14 === Text from textarea 15 15 Textatea in the same document as content editable area. Textarea contains: 16 16 {{{ 17 17 foo bar 18 18 }}} 19 == 2 images from system file browser19 === 2 images from system file browser 20 20 Because file API is based on `files` array multiple file should works the same way as one file, but if it is not possible to drop/paste two files I also tested one file. 21 21 22 == 2 text files from system file browser23 As above. 24 25 == Part of image from MS Paint22 === 2 text files from system file browser 23 As above. 24 25 === Part of image from MS Paint 26 26 Part of png/jpeg file opened with MS Paint. It is not possible to drag part of the image from Paints editing area so only copy and paste is possible. The same for Gimp. 27 27 28 == Part of document from MS Word/Wordpad28 === Part of document from MS Word/Wordpad 29 29 Document containing formatted (bolded) text and image: 30 30 {{{ … … 34 34 }}} 35 35 36 == Text from notepad36 === Text from notepad 37 37 Like for Paint D&D is not possible. 38 38 39 == Text from pdf (Adobe Reader XI)39 === Text from pdf (Adobe Reader XI) 40 40 Like for Paint D&D is not possible. 41 41 42 = Blink - Drag & Drop = 42 = 2. Results: Blink = 43 44 == 2.1. Drag & Drop == 45 43 46 Tested with Chrome (version 32) and Opera (version 19). 44 47 45 === ==HTML from outside of editable area48 === HTML from outside of editable area 46 49 Data in two types: 47 50 - `text/plain`: correct plain text … … 56 59 <p style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span class="Apple-converted-space"> </span>eu odio.</p><img src="http://ckeditor.dev/samples/local/crayons.jpg" width="30" height="30" style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;"></span><p style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Aliquam<span class="Apple-converted-space"> </span><b>mi est</b>, interdum</p> 57 60 }}} 58 === ==HTML from inside of editable area59 As above. 60 === ==Text from textarea61 Data in `text/plain`. 62 === ==2 images from system file browser61 === HTML from inside of editable area 62 As above. 63 === Text from textarea 64 Data in `text/plain`. 65 === 2 images from system file browser 63 66 '''Chrome''': Three items: 64 67 - `text/uri-list` with file paths … … 77 80 }}} 78 81 79 === ==2 text files from system file browser80 As above. 81 82 === ==Part of image from MS Paint83 D&D is not possible. 84 85 === ==Part of document from MS Word/Wordpad82 === 2 text files from system file browser 83 As above. 84 85 === Part of image from MS Paint 86 D&D is not possible. 87 88 === Part of document from MS Word/Wordpad 86 89 - `text/plain`: correct plain text 87 90 {{{ … … 129 132 }}} 130 133 131 === ==Text from notepad132 D&D is not possible. 133 134 === ==Text from pdf (Adobe Reader XI)135 D&D is not possible. 136 137 138 == Blink -Copy & paste ==134 === Text from notepad 135 D&D is not possible. 136 137 === Text from pdf (Adobe Reader XI) 138 D&D is not possible. 139 140 141 == 2.2. Copy & paste == 139 142 For Copy and Paste `Clipboard` object is available as `evt.clipboardData`, not `evt.dataTranfer`. 140 143 141 === ==HTML from outside of editable area144 === HTML from outside of editable area 142 145 The same as D&D. 143 146 144 === ==HTML from inside of editable area147 === HTML from inside of editable area 145 148 The same as D&D/above. 146 149 147 === ==Text from textarea150 === Text from textarea 148 151 The same as D&D. 149 152 150 === ==2 images from system file browser153 === 2 images from system file browser 151 154 No files nor items available in `clipboardData`. 152 155 153 === ==2 text files from system file browser156 === 2 text files from system file browser 154 157 No files nor items available in `clipboardData`. 155 158 156 === ==Part of image from MS Paint159 === Part of image from MS Paint 157 160 One item which is file in "image/png" type (it does not matter if the source file was png, jpg or bmp). 158 161 159 162 For native drop I get nothing. 160 163 161 === ==Part of document from MS Word/Wordpad164 === Part of document from MS Word/Wordpad 162 165 Data in three formats: 163 166 - `text/plain`, … … 170 173 }}} 171 174 172 === ==Text from notepad173 Data in `text/plain`. 174 175 === ==Text from pdf (Adobe Reader XI)175 === Text from notepad 176 Data in `text/plain`. 177 178 === Text from pdf (Adobe Reader XI) 176 179 Data in two formats: 177 180 - `text/plain`, … … 183 186 184 187 185 = Firefox - Drag & Drop = 186 New D&D API is not available, only old one. 188 = 3. Results: Firefox = 189 190 == 3.1. Drag & Drop 191 192 New D&D API is not available. 187 193 Tested with version 26. 188 194 189 === ==HTML from outside of editable area195 === HTML from outside of editable area 190 196 Data in four types 191 197 - `text/_moz_htmlcontext`, … … 207 213 }}} 208 214 209 === ==HTML from inside of editable area210 As above. 211 212 === ==Text from textarea213 Data in `text/plain`. 214 215 === ==2 images from system file browser215 === HTML from inside of editable area 216 As above. 217 218 === Text from textarea 219 Data in `text/plain`. 220 221 === 2 images from system file browser 216 222 `types` contains 3 types: 217 223 - "application/x-moz-file", … … 221 227 `files` contains 2 `file` elements. 222 228 223 === ==2 text files from system file browser224 As above. 225 226 === ==Part of image from MS Paint227 D&D is not possible. 228 229 === ==Part of document from MS Word/Wordpad229 === 2 text files from system file browser 230 As above. 231 232 === Part of image from MS Paint 233 D&D is not possible. 234 235 === Part of document from MS Word/Wordpad 230 236 Data in `text/plain`: 231 237 {{{ … … 235 241 }}} 236 242 237 === ==Text from notepad238 D&D is not possible. 239 240 === ==Text from pdf (Adobe Reader XI)241 D&D is not possible. 242 243 = Firefox - Copy & paste=243 === Text from notepad 244 D&D is not possible. 245 246 === Text from pdf (Adobe Reader XI) 247 D&D is not possible. 248 249 == 3.2. Copy & paste == 244 250 245 251 for Copy and Paste `Clipboard` object is available as `evt.clipboardData`, not `evt.dataTranfer` (as in Chrome). 246 252 247 === ==HTML from outside of editable area253 === HTML from outside of editable area 248 254 As D&D. 249 255 250 === ==HTML from inside of editable area256 === HTML from inside of editable area 251 257 As D&D. 252 258 253 === ==Text from textarea254 Data in `text/plain`. 255 256 === ==2 images from system file browser259 === Text from textarea 260 Data in `text/plain`. 261 262 === 2 images from system file browser 257 263 `types` contains 2 types: 258 264 - `application/x-moz-file`, … … 261 267 `files` contains '''only 1''' `file` elements. 262 268 263 === ==2 text files from system file browser264 As above. 265 266 === ==Part of image from MS Paint269 === 2 text files from system file browser 270 As above. 271 272 === Part of image from MS Paint 267 273 No data types nor files. But you can paste image using naive paste: 268 274 {{{ … … 270 276 }}} 271 277 272 === ==Part of document from MS Word/Wordpad278 === Part of document from MS Word/Wordpad 273 279 Object as for D&D, but you can paste html (with formatting attributes, without image) using native C&P. 274 280 275 281 Also using native paste, if you select only the image in Word you can also paste it (like for part of image from MS Paint). 276 282 277 ===== Text from notepad 278 Data in `text/plain`. 279 280 ===== Text from pdf (Adobe Reader XI) 281 Data in `text/plain`. 282 283 284 = IE - Drag & Drop = 283 === Text from notepad 284 Data in `text/plain`. 285 286 === Text from pdf (Adobe Reader XI) 287 Data in `text/plain`. 288 289 290 = 4. Results: IE = 291 292 == 4.1. Drag & Drop 293 285 294 For IE I tested IE 11 and IE 8. 286 295 … … 289 298 IE8 does not contains `types` nor `files` arrays in `dataTransfer`, but methods `getData()`, `setData()` and `clearData()` exists so you can get Text data using `getData( 'Text' )` like in IE 11. 290 299 291 === ==HTML from outside of editable area300 === HTML from outside of editable area 292 301 You can get text data using `getData("Text")`: 293 302 {{{ … … 301 310 '''IE11''': 1 type in `types`: "Text". 302 311 303 === ==HTML from inside of editable area304 As above. 305 306 === ==Text from textarea312 === HTML from inside of editable area 313 As above. 314 315 === Text from textarea 307 316 Data in 1 type: "Text". 308 317 309 === ==2 images from system file browser318 === 2 images from system file browser 310 319 '''IE11''': Only "Files" data type. 311 320 2 file in `files` array. … … 315 324 '''IE8''': Drop event, but IE8 does not support file upload so `getData("Text")` return null and there are no files array. 316 325 317 === ==2 text files from system file browser318 As above. 319 320 === ==Part of image from MS Paint321 D&D is not possible. 322 323 === ==Part of document from MS Word/Wordpad326 === 2 text files from system file browser 327 As above. 328 329 === Part of image from MS Paint 330 D&D is not possible. 331 332 === Part of document from MS Word/Wordpad 324 333 You can get text data using `getData("Text")`: 325 334 {{{ … … 333 342 If I drag single image from Word I get empty DataTransfer object (no types nor files). 334 343 335 ===== Text from notepad 336 D&D is not possible. 337 338 ===== Text from pdf (Adobe Reader XI) 339 D&D is not possible. 340 341 342 = IE - Copy & paste = 344 === Text from notepad 345 D&D is not possible. 346 347 === Text from pdf (Adobe Reader XI) 348 D&D is not possible. 349 350 351 == 4.2. Copy & paste 352 343 353 On IE we do not have `evt.clipboardData` nor `evt.dataTransfer` but we can use `window.clipboardData`: 344 354 - `evt.dataTransfer` is `null` … … 351 361 Also [http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/clipboardDataEX.htm Microsoft Clipboard sample] does not work on IE11 nor on IE8 (it works on IE 10). 352 362 353 === ==HTML from outside of editable area363 === HTML from outside of editable area 354 364 You can get plain text data calling `clipboardData.getData("Text")`. 355 365 … … 358 368 '''IE11''': `types` is `null`. 359 369 360 === ==HTML from inside of editable area361 As above. 362 363 === ==Text from textarea364 As above. 365 366 === ==2 images from system file browser370 === HTML from inside of editable area 371 As above. 372 373 === Text from textarea 374 As above. 375 376 === 2 images from system file browser 367 377 No paste event, only `onBeforePaste` with no Text data nor files (on IE 11 files array exists, but contains no element). Also IE show security dialog then I use `onBeforePaste`. 368 378 369 379 With native paste event nothing happen. 370 380 371 === ==2 text files from system file browser372 As above. 373 374 === ==Part of image from MS Paint381 === 2 text files from system file browser 382 As above. 383 384 === Part of image from MS Paint 375 385 '''IE11''': One file in png format (it does not matter what was origin extension). 376 386 Using native paste you can paste image as `data:image/png;base64`. … … 378 388 Nothing happens using native paste. 379 389 380 === ==Part of document from MS Word/Wordpad390 === Part of document from MS Word/Wordpad 381 391 '''IE11''': Plain text data (`clipboardData.getData("Text")`) and image file in `files` array. 382 392 … … 385 395 '''IE8''': Text data using getData("Text"). Plain text with native paste. 386 396 387 === ==Text from notepad397 === Text from notepad 388 398 You can get text data calling `clipboardData.getData("Text")`. 389 399 390 400 '''IE11''': `types` is `null`. 391 401 392 === ==Text from pdf (Adobe Reader XI)402 === Text from pdf (Adobe Reader XI) 393 403 As above. 394 404