How to create a new plugin to wrap selected text in a DIV block #508
-
Hi I would like to create a plugin using slate-plugins, I would like to achieve the following steps
I am new to this slate and I have gone through many topics but could not able to find a better document for plugin creation. Could anyone guide me? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Take a look to the Align plugin, it's using |
Beta Was this translation helpful? Give feedback.
-
I am successfully created the plugin, I have one more question
Task 1:
Task 2: Task 3: Task 4: Could anyone help me with that? |
Beta Was this translation helpful? Give feedback.
-
Did you update to For id generation, you can use |
Beta Was this translation helpful? Give feedback.
-
I have updated to "@udecode/slate-plugins": "^0.62.1" withNodeID it is not generating id I have attached the block plugin, please take a look is not working or I am missing simething, Actually I have copied the align plugin and try to modify that. Do you have any other documentation for that? |
Beta Was this translation helpful? Give feedback.
-
On my side it is generating id for new blocks. This is the only docs we have for now https://slate-plugins-api.netlify.app/. |
Beta Was this translation helpful? Give feedback.
-
I am very new to this React and slate. Could you please help me on this to understand the APIs? I did not find any tutorial on how to do things in slate. I might contribute to enhance the documentation for new plugin development. |
Beta Was this translation helpful? Give feedback.
Did you update to
0.62.0
? You can easily setclassNames
on any plugin. See the options https://slate-plugins-next.netlify.app/?path=/docs/api-renderelement--pageFor id generation, you can use
withNodeID