-
Lets say I have an empty slate editor. When I type any letter, it is wrapped inside a Now I want to select one word in this single I have no idea how I can implement this. I am only able to add the Transforms.wrapNodes(editor, link, { split: true }) But that's not what I want. I want to add the tag inline, like written above. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok got it. I had to wrap the whole editor in an function which discribes a link as an inline element. I thought I can pass this information while placing the link element but that was a wrong assumption. Here is the example function setting links as inline elements: |
Beta Was this translation helpful? Give feedback.
Ok got it. I had to wrap the whole editor in an function which discribes a link as an inline element. I thought I can pass this information while placing the link element but that was a wrong assumption.
Here is the example function setting links as inline elements:
https://github.com/ianstormtaylor/slate/blob/main/site/examples/inlines.tsx#L117-L154