简体   繁体   中英

Meteor ShareJS document update/snapshot wipes out other values

I'm using the Meteor ShareJS package for concurrent editing. I am trying to write additional values to items in the docs collection. Things like titles, etc. It seems to work until a document is edited in the ACE editor to the point where a new snapshot is created. At this point all of the extra fields are cleared.

I'm the maintainer of the meteor-sharejs package.

The recommended way to use the package is to keep all metadata in a Meteor Collection, and not in the ShareJS docs collection. This is because they are basically separate software stacks that do not talk to each other. It's also possible that you are using a docs collection for your documents which is the same name as the ShareJS collection; then they would be overwriting each other.

If you'd like to see ShareJS not head in the direction of being compatible only with Derby, I'd encourage you to chip in at https://github.com/share/ShareJS/issues/277 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM