ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.5k stars 3.7k forks source link

Drop inline object in text #16101

Open jirivinduska opened 6 months ago

jirivinduska commented 6 months ago

📝 Ask a question

I created a custom inline object that inherits all from inlineObject that contain one other element.

<inline><foo></foo></inline>

This custom can not be dropped into text. The drop target position never lands to #text. The only way to insert it inside the text is to place it next to another inline object - this way, the drop target caret shows. Is there some configuration or method to force showing drop target inside text?

I was curious, and if inlineObject does not contain anything, then the drop target position works as expected.

jirivinduska commented 6 months ago

Anything?

Witoso commented 6 months ago

Hi! Could you provide some recording? I'm not sure if I understand.

jirivinduska commented 6 months ago

https://github.com/ckeditor/ckeditor5/assets/49195922/db495426-8ed8-4624-b426-cfaf55bed9f4

Basicaly in the recording I have three widgets two of them are inline the footnote and the Equation (Inline) and one of them is normal block widget Equation (block).

When I try to drag and drop footnote which is empty inline widget it is working as expected. Drop zone is correctly triggered in text. When I try to drag and drop Inline Equation it does not work properly it does not let me drop in text, only next to other inline widgets. Inline Equation is widget which is not empty and looks like this in model

<inline><math></math></inline> possibly this is the reason why it does not work, but can I somehow oelvercome this by forcing drop zone in text for this inline widget?

jirivinduska commented 6 months ago

any news?

jirivinduska commented 6 months ago

Do you know how to resolve this?

jirivinduska commented 3 months ago

Bump