Add data-attribute to table

Hi, I need help. I want to add data-attribute to the table, but it doesn’t work.

Could you tell me please what’s wrong with my code? Thanks!

It sounds like you are confusing ProseMirror node atrributes and DOM attributes. These are different things.

Oh, maybe I missed it in the documentation, thanks!

But I can’t understand how to add class to the table. Can you give me a hint? Thanks!

You add a class to the table element either by using the toDOM method, a custom nodeView, or by applying a node decoration. Which one depends on what youre using data-visible for.

Done, thanks for the help!