Custom Extensions: how to add a custom class? #1881
Unanswered
ElHex
asked this question in
Questions & Help
Replies: 2 comments 1 reply
-
Does that help? https://www.tiptap.dev/guide/styling/#option-2-add-custom-classes |
Beta Was this translation helpful? Give feedback.
0 replies
-
If you want to build a LineHeight extension have look at the source code of the TextAlign extension: https://www.tiptap.dev/api/extensions/text-align It’s bascially the same, just replace text-align with line-height, pass numbers as a value and so on. :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I've been loving tiptap! really wonderfull editor but I think we are lacking a bit in the documentation, I've seen all the examples but haven't found any way to change/add a custom class?
I've been trying to apply a "line height" custom extension using a class, but only I've seen examples with the attributes part:
on
addGlobalAttributes ()
is there a option for class? Thanks!Beta Was this translation helpful? Give feedback.
All reactions