Skip to content

Guide for using plugins without UI #2864

Answered by 12joan
Mangatt asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  • How to access the editor instance (see https://platejs.org/docs/accessing-editor)
    • useEditorState is best for simplicity
    • a combination of useEditorRef and useEditorSelector is best for performance
  • someNode - check if an element type is active in the selection
  • toggleNodeType - toggle an element type for the selection
  • i…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Mangatt
Comment options

You must be logged in to vote
1 reply
@12joan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #2863 on January 07, 2024 09:50.