Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

richt text elements

default discord avatar
raoulyounglast year
2

Has someone made a custom codeblock element to the rich text editor?



I wanted to trigger a leaf while adding the type and ended up with this



const ToolbarButton: React.FC<{ path: string }> = () => {


return (


<ElementButton format="code-block">


<LeafButton format="code">Code</LeafButton>


</ElementButton>


);


};



export default ToolbarButton;



wonder if this is a good practice solution at all.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.