toDOM(Node) {} 's Node can get Parent or position?

in my case, i wanna compare two tables , if table-row and table-cell has some ‘info or position based id’, it would be much easier to know where the insert, delete or modify happened.

DOMSerializer.fromSchema(schema).serializeFragment(content) fires toDOM function, but the only parameter i can get is Node, is there any way i can get position (for example the index of tr in that tbody) base on that Node ?

parseDOM(HTMLElement){} do can get position, however the save action (DOMSerializer.fromSchema(schema).serializeFragment(content) fires toDOM()) not fires it at all

1 Like

any solution yet ? :smiling_face_with_tear:

I’m also looking for a solution to this. Need some aria-roles to be applied only under some specific contexts.

Did you guys find a workaround? :slight_smile:

Node representations are context-independent. You’ll have to put decorations on them if you want to give them information about their context.