-
Edit to clarify question: Attempting to mark a selection as an inline element causes the below error. Sandbox: https://codesandbox.io/s/sandpack-project-forked-hpilkc?file=/App.tsx Plugin config:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 14 replies
-
Can you edit your question with more details about what you're trying to achieve with your cut plugin and what exactly is going wrong? If you can make a code sandbox with just the cut plugin and any other code necessary to reproduce your issue, that would be the fastest way of getting help. Here's a code sandbox with the code you posted to get you started. |
Beta Was this translation helpful? Give feedback.
-
@12joan all I'm trying to do is select one or more nodes and have them wrapped inside a new parent element node with the type set to the key I can create a sandbox if really needed, but I'm not certain this is a bug. More likely that my expectations are off for what it takes to create an inline element - it was super simple to do this as an element or mark - or I'm doing something wrong. |
Beta Was this translation helpful? Give feedback.
-
Here's what finally worked for me: The plugin:
The custom key down handler:
And a button for wrapping elements via the selection toolbar:
|
Beta Was this translation helpful? Give feedback.
Here's what finally worked for me:
The plugin:
The custom key down handler: