ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Paste of image results in image at 200% on hidpi displays

Open InputNeuron opened this issue 6 years ago • 5 comments

📝 Provide detailed reproduction steps (if any)

  1. copy an image to the clipboard from a browser window
  2. paste it into ckeditor
  3. behold, an image at 200% that thinks it's at 100% (original)

✔️ Expected result

Should be at the original 100% size.

❌ Actual result

It displays at twice the size.

📃 Other details

  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36
  • OS: MacOS Catalina
  • CKEditor version: 23.1.0
  • Installed CKEditor plugins: …
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
import Subscript from '@ckeditor/ckeditor5-basic-styles/src/subscript';
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
import Heading from '@ckeditor/ckeditor5-heading/src/heading';
import Image from '@ckeditor/ckeditor5-image/src/image';
import ImageCaption from '@ckeditor/ckeditor5-image/src/imagecaption';
import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle';
import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar';
import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload';
import Link from '@ckeditor/ckeditor5-link/src/link';
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
import Table from '@ckeditor/ckeditor5-table/src/table';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties';
import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties';
import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation';
import Markdown from '@ckeditor/ckeditor5-markdown-gfm/src/markdown';
import Base64UploadAdapter from '@ckeditor/ckeditor5-upload/src/adapters/base64uploadadapter';
import ImageResize from '@ckeditor/ckeditor5-image/src/imageresize';
import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters';
import SpecialCharactersEssentials from '@ckeditor/ckeditor5-special-characters/src/specialcharactersessentials';

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

InputNeuron avatar Nov 23 '20 17:11 InputNeuron

Here's the original image

image

here's what the result looks like (note it says 'original' size)

image

InputNeuron avatar Nov 23 '20 17:11 InputNeuron

Ha. Github has the same bug here I think. Note that summernote (the platform we're moving from) doesn't exhibit this problem.

InputNeuron avatar Nov 23 '20 17:11 InputNeuron

I think ckeditor5 has to set the size on the device that did the paste. We can't just scale images based on the size in the HTML because the user could be going between devices with multiple devicePixelRatios... it has to be set when it's pasted from the clipboard.

InputNeuron avatar Nov 23 '20 18:11 InputNeuron

There has been no activity on this issue for the past two years. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Sep 04 '23 05:09 CKEditorBot

We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

CKEditorBot avatar Oct 12 '23 05:10 CKEditorBot