I am working on a simple collaborative editor. I am trying to implement a functionality to show/hide all images in the editor based on document attribute flag. For this, added a document attribute and from a custom menu command did the following:
const transaction = state.tr.step(new SetDocAttr(‘custAttrFlag’, ‘myVal’)) dispatch(transaction)
Followed this (Changing doc.attrs?) and the document attribute is getting update locally, but not collaborative.
Is there is any limitation in this case with prose-mirror?
Please help and suggest how can I achieve this. Appreciate quick response. Thanks for considering!