isSelectable: false, void element still selected and impossible to insertText next to custom inline element #4678
Replies: 2 comments 4 replies
-
|
Hi @QuentinFrc! I'm Dosu and I’m helping the plate team. This happens because inline void elements with To improve this, try configuring the plugin's SuitIconPlugin.configure({
rules: {
selection: { affinity: 'outward' }
}
})This tells Plate to move the caret outside the inline element when typing at its boundary, which usually restores normal text input behavior next to your custom element. See more about affinity options and their effects in the Plate plugin rules docs. If you need the element to be selectable, consider setting To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
Mention plugin has a similar issue, and I this this is a bug in Slate. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I've been struggling for several days with a custom plugin that I'm having trouble getting to work as I want. My use case is quite basic: I want to insert custom inline elements that correspond to special characters. I need to handle the render part of this component because the character is relative to data external to the editor.
Screenity.video.-.Oct.10.2025.12.13.AM.mp4
Plugin definition
Plugin Node + Insert toolbar button
Everything is working well, but when I place the caret between or next to a Suit element, I am no longer able to type anything. I need to move the caret using keyboard arrows to "leave" this suit element and type text again
Question is WHY ?
(I tried some tricks to patch that doesn't work like: move artificially selection on mouseDown on SuitElement, use a leaf, ....)
Beta Was this translation helpful? Give feedback.
All reactions