Skip to content
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

Drag and drop of textual content and widgets #9128

Closed
niegowski opened this issue Mar 1, 2021 · 6 comments · Fixed by #9129
Closed

Drag and drop of textual content and widgets #9128

niegowski opened this issue Mar 1, 2021 · 6 comments · Fixed by #9129
Assignees
Labels
domain:ui/ux This issue reports a problem related to UI or UX. Epic package:clipboard squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@niegowski
Copy link
Contributor

📝 Provide a description of the new feature

Extracted from #2664. Scenario A, B, and C with the assumption that dropping is allowed only in text positions or on the widgets.


If you'd like to see this feature implemented, add a 👍 reaction to this post.

@niegowski niegowski added type:feature This issue reports a feature request (an idea for a new functionality or a missing option). domain:ui/ux This issue reports a problem related to UI or UX. squad:core Issue to be handled by the Core team. labels Mar 1, 2021
@niegowski niegowski added this to the iteration 41 milestone Mar 1, 2021
@niegowski niegowski self-assigned this Mar 1, 2021
@niegowski niegowski added the Epic label Mar 1, 2021
@niegowski
Copy link
Contributor Author

@castroCrea
Copy link
Contributor

@niegowski Game changing Thx alot

@castroCrea
Copy link
Contributor

castroCrea commented Mar 1, 2021

What do you think of adding a drag indicator possibility (it can automatically select the block)? I think it is nice for the UX.

image

@Reinmar
Copy link
Member

Reinmar commented Mar 1, 2021

@castroCrea If I understand correctly, these are scenarios C and D from #2664 and outside the scope of the current work. There's dedicated #7731 for the block-level dnd.

@Reinmar
Copy link
Member

Reinmar commented Mar 1, 2021

The cool thing is that @niegowski managed to make block widgets draggable in an inline-manner, but with what I think is a reasonably good UX. So it's not yet a proper block-level drag&drop, but it's a major improvement over what's currently completely impossible.

@seancowan-dev
Copy link

Awesome stuff, I've been working on my own solution based on using text ranging, but it doesn't seem to be viable. I may end up going with block level only.

oleq added a commit that referenced this issue Mar 11, 2021
Feature (clipboard): Implemented the basic content drag and drop support. Closes #9128.

Feature (clipboard): The `contentInsertion` event is fired from `ClipboardPipeline` to enable customization of content insertion (see #9128).

Other (clipboard): The paste as plain text feature was extracted to the dedicated `PastePlainText` plugin (see #9128).

Other (engine): The `mouseup` event is fired by the `MouseObserver` (see #9128).

Other (table): The `mouseup` event is no longer fired by the `MouseEventsObserver` from the ckeditor5-table package (now handled by `MouseObserver`) (see #9128).

Internal (code-block, image, link, media-embed, paste-from-office): Updated to the changes in clipboard pipeline (see #9128).

Internal (widget): The `mousedown` event is no longer stopped from the default handling to enable content dragging (see #9128).

BREAKING CHANGE (clipboard): The `inputTransformation` event is no longer fired by the `Clipboard` plugin, now the `ClipboardPipeline` plugin is responsible for firing that event (see #9128).

BREAKING CHANGE (clipboard): The `clipboardInput` and `inputTransformation` events should not be fired or stopped in the feature code. The `data.content` property should be assigned to override the default content instead. You can stop this event only if you want to completely disable pasting/dropping of some content \[TODO migration guide link\] (see #9128).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ui/ux This issue reports a problem related to UI or UX. Epic package:clipboard squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants