Skip to content

How to get all the attributes of the selection? #1511

Discussion options

You must be logged in to vote

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 and getAttributes based the current selection:

const isBold = editor.isActive('bold')

const isLink = editor.isActive('link')
const linkAttributes = editor.getAttributes('link')

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@gfazioli
Comment options

@EmanH
Comment options

@SarathSantoshDamaraju
Comment options

Answer selected by pat-son
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants