sharejs.open(docName, 'text', function(error, newDoc) {if (doc !== null) { //here I get that the doc is not defined!doc.close();doc.detach_cm();}doc = newDoc;if (error) {console.error(error);return;}doc.attach_cm(editor);});but I get this error on the first line that the doc is not defined. any ideas?
Try putting "var doc" before all that code?
--
You received this message because you are subscribed to the Google Groups "ShareJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sharejs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Multiple editors should work fine. Open a doc per editor and attach it to code mirror. What's the problem?
(For those following along, multiple editors all editing one doc also works in the ShareJS rewrite.)
Multiple editors should work fine. Open a doc per editor and attach it to code mirror. What's the problem?