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

Mention determine focus after drag ansd drop #13742

Closed
PolgunE opened this issue Mar 23, 2023 · 1 comment
Closed

Mention determine focus after drag ansd drop #13742

PolgunE opened this issue Mar 23, 2023 · 1 comment
Labels
resolution:resolved This issue was already resolved (e.g. by another ticket). squad:core Issue to be handled by the Core team. type:question This issue asks a question (how to...).

Comments

@PolgunE
Copy link

PolgunE commented Mar 23, 2023

📝 Mention by drag and drop

Here is example how we determine position . Where we put mention item.
It would be great to determine the focus in the place where the element was thrown on the drag drop.

const focus = editor.model.document.selection.focus;
editor.execute( 'mention', {
marker: '#',
mention: {
id: '#1234',
name: 'Foo',
title: 'Big Foo'
},
range: model.createRange( focus, focus.getShiftedBy( -1 ) )
} );

What is the expected behavior of the proposed feature?

It would be great to determine the focus in the place where the element was thrown on the drag & drop
and inserting a mention in the place where it is thrown.
Is this possible for now ?


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

@PolgunE PolgunE added the type:feature This issue reports a feature request (an idea for a new functionality or a missing option). label Mar 23, 2023
@Witoso
Copy link
Member

Witoso commented Apr 20, 2023

This page should help you: https://ckeditor.com/docs/ckeditor5/latest/features/pasting/drag-drop.html along with the example js file.

Dropping behaves like pasting, here's a deep dive: https://ckeditor.com/docs/ckeditor5/latest/features/pasting/drag-drop.html

@Witoso Witoso closed this as completed Apr 20, 2023
@Witoso Witoso added type:question This issue asks a question (how to...). resolution:resolved This issue was already resolved (e.g. by another ticket). squad:core Issue to be handled by the Core team. and removed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). labels Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:resolved This issue was already resolved (e.g. by another ticket). squad:core Issue to be handled by the Core team. type:question This issue asks a question (how to...).
Projects
None yet
Development

No branches or pull requests

2 participants