How to get all the attributes of the selection? #1511
Answered
by
philippkuehn
pat-son
asked this question in
Questions & Help
-
Quill.js has a function getFormat which returns all the attributes (formats) of the text in the selection. I don't see anything similar in tiptap in the docs, unless I'm mistaken. |
Beta Was this translation helpful? Give feedback.
Answered by
philippkuehn
Jun 24, 2021
Replies: 2 comments 3 replies
-
No, there is not such a method to get all attributes of all marks. But you can check the active state and attributes with const isBold = editor.isActive('bold')
const isLink = editor.isActive('link')
const linkAttributes = editor.getAttributes('link') |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
pat-son
-
I am using this: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No, there is not such a method to get all attributes of all marks. But you can check the active state and attributes with
isActive
andgetAttributes
based the current selection: