-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline images - support multiple images in a single block #2052
Comments
any work around/alternative for the time being? |
As ateeqsuhail said is there any workaround to make it work for now ? |
I developed my own plugin for this. I used the image plugin as example and tried to reuse as much code as possible. The schema of course is different: schema.register('inline-image', {
// Allow wherever text is allowed:
allowWhere: '$text',
// The image will act as an inline node:
isInline: true,
// The inline widget is self-contained so it cannot be split by the caret and can be selected:
isObject: true,
allowAttributes: ['alt', 'src', 'srcset']
}); |
I have downgraded to version 4, since it has all the features. |
Hello @kleinph, |
I am not entirely sure, because I built this for a former employer. Also its not 100% perfect. |
One very valid use case that requires supporting inline images reported by our customer: in an internal application for sending messages many times users start an email from copying/pasting content from other sources/emails. In those quoted emails, people have in the footer links to socials that consist of separate small inline (linked) images: when those images are pasted, they become block images that take the whole width of the page, which of course looks wrong. |
We discussed with @oleq some UX aspects of this feature.
|
More notes:
|
More notes: We need to design a heuristic for detecting whether an image that's being inserted is inline or not. Some examples:
|
About heuristic, I think that should be something simple and predictable, so users will always know what will happen. The best will be only one detection rule. Detecting using with/heigh leaves too much ambiguity: why this 50x50px inserted image is inline, and 55x55px image inserted next to it is a block? What should be the size limit? I propose detecting only by the place of insert: Inline between text or in a list, block in an empty paragraph. After analyzing feedback from the users I see that the most popular use case for this feature is to just insert an image between text. There is also one thing to discuss: Inline/block switch Icon location and design. For the location, the balloon seems to be reasonable. But we need someone to design the infographic. |
π It's been a while since the last update, so here are the highlights from the past couple of months.Β P.S. You can check out the latest code in the live feature branch.Β What's new?Inline image insertion and resizeThe editor not only accepts inline images but provides feature parity between block and inline images. Both types of images can be uploaded, styled, resized, alt-texted, and support Adding captions to inline images (inline->block conversion)Inline images cannot be captioned but users can quickly turn them into blocks by adding the caption. The caption is preserved between various image styles (turning a captioned image into inline, then back to block will preserve the content of the caption). New image stylesThe TODOsAlthough the core of the feature is ready, there are still a couple of major of tasks down the road:
|
π’ I have some good news I would like to share with anyone interested in this feature π’ After over half a year of development, the core of inline images has been merged to TL;DR: See inline images in action. Here are some highlights:
That's it for now but stay tuned. The release of CKEditor 5 v29.0.0 will be announced on the blog in July. |
We have the latest version from the cdn and none of these features exist? |
Is this a bug report or feature request? (choose one)
π Feature request
π» Version of CKEditor
CKEditor version 5, decoupled document build
π Steps to reproduce
β Expected result
Two small images should be in same line with space e.g. Image1 Image2
β Actual result
Currently they are stacked up from top to bottom.
Future work
MVP step 2: #8666
Nice to have features: #8712
If you'd like to see this feature implemented, add π to this post.
The text was updated successfully, but these errors were encountered: