We're using flexible playgrounds for live editing React code.
Let's start with the smallest editor implementation.
This looks the same than a
Let's add a placeholder and some padding using
Once you render multiple
Plate, you'll need to pass unique
id to each.
This is optional for the first one.
Let's set the initial value of the editor to one block of text.
For readability, we're storing common constants in
See all the imported variables.
Now we would like to listen to editor changes so we can save the value somewhere.
Plate children are rendered just before the editable component.
Now we're ready to use plugins!