-
It would be nice to have guide/docs for using plugins without provided UI. I guess that we are not only one who have specific UX requirements and who would like to take advantage of just parts of this project. Funding
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I use Plate with a fully custom UI in my app (https://untitlednote.xyz), and it's pretty simple if you steer clear of the more complex plugins (like tables and mentions). For the components, you can follow the instructions here: https://platejs.org/docs/plugin-components#defining-components For building toolbars, here are the main concepts you'll need to be familiar with:
The docs for these functions are available here (https://platejs.org/docs/api/core), but I recommend searching Plate's source code for examples of them. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, @12joan, this is very helpful. Nevertheless, I still think that guide would be very helpful, going through source code with trial/error method is quite time consuming and will not never produce nearly as good results as using this repo as intended by it's authors. Btw, |
Beta Was this translation helpful? Give feedback.
I use Plate with a fully custom UI in my app (https://untitlednote.xyz), and it's pretty simple if you steer clear of the more complex plugins (like tables and mentions).
For the components, you can follow the instructions here: https://platejs.org/docs/plugin-components#defining-components
For building toolbars, here are the main concepts you'll need to be familiar with:
editor
instance (see https://platejs.org/docs/accessing-editor)useEditorState
is best for simplicityuseEditorRef
anduseEditorSelector
is best for performancesomeNode
- check if an element type is active in the selectiontoggleNodeType
- toggle an element type for the selectioni…