Allow Custom CSS Classes on All Block Elements? #1792
-
Hi, I would like to give my users the ability to add custom css classes to any of the block level elements in the editor. I've been able to do this with the Paragraph node by creating a custom Paragraph extension, however, this seems a bit overkill to have to do it for every node type I wish to target. Is there a global way to do this? Sidenote - I would also like to be able to wrap any selected text in a tag with a custom class, but I figure I should start off simple and just focus on the block level elements first :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
you can add classes like this: https://www.tiptap.dev/guide/styling/#option-2-add-custom-classes |
Beta Was this translation helpful? Give feedback.
you can add classes like this: https://www.tiptap.dev/guide/styling/#option-2-add-custom-classes