-
Hi! I'm having some trouble figuring out the autoformat plugin. I'd like to insert an inline element when pressing a shortcut (e.g.: '$'), and have tried a lot of autoformat rules. However, it seems like the only way to accomplish this is having an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If it's just one key, you can use |
Beta Was this translation helpful? Give feedback.
If it's just one key, you can use
onKeyDown
, something similar to https://github.com/udecode/slate-plugins/blob/4055fb1b94ea1eec4976028baadb7805e85e375f/packages/slate-plugins/src/common/utils/getOnHotkeyToggleNodeType.ts#L14-L35 to insert elements instead of toggling