Different client schemas in collab setting

Program is a collab editor using tracked changes.

The goal is to introduce slightly different formatting on some clients (tracked changes are displayed differently).

My thought was that we could utilize slightly differing schemas to accomplish this (same mark/node types, just rendering them to the DOM with different classes and attributes). This works if I re-render the whole document, but trying to apply transactions when there is a slightly different schema is yielding Transform Errors: Invalid content…

I can take a different approach and alter the schema based on passed attributes, but I was hoping to just dynamically trigger different schemas to render the document slightly differently. I thought it would work as long as the node/mark types remain the same, even if the spec differs slightly. Was this an erroneous assumption?

Seems like using the same schema with different Node Views would work well here. You’d still need your schema to recognize the DOM generated by either set of Node Views and you’d need to make sure that DOM had all the attributes the schema needed somewhere (I like to use data attributes on the outermost element) even if they weren’t visible in both views.

Node objects have a reference to their NodeType, and these are compared by object identity. So though it would be possible to have different clients use different (but compatible) schemas throughout, things will break if you try to apply steps created or deserialized with one schema to a document that uses another schema.

Thank you. I will take the alternate route.