Closed ananyasen closed 12 years ago
After stepping through codemirror.js a bit more I do see that, the instance does get a new instance of the History object.
However, when I do a codemirrorInstance.historySize() on the different instances, I see that history of one instance is getting updated even if I do text edits on a different codemirror editor instance.
Am I missing something here?
Thanks Ananya
I assume you're using CodeMirror version 2? That's at https://github.com/marijnh/CodeMirror2/
Anyway, I can not reproduce this, and it seems very unlikely behaviour -- there's nothing shared about history objects. Could you double check that you're testing the right thing?
Oh, I see you also opened an issue on the other repository. Closing this one.
Ok thanks.
On Wed, Feb 8, 2012 at 11:26 AM, Marijn Haverbeke < reply@reply.github.com
wrote:
Oh, I see you also opened an issue on the other repository. Closing this one.
Reply to this email directly or view it on GitHub: https://github.com/marijnh/CodeMirror/issues/62#issuecomment-3874164
Hi,
I am trying to have multiple codemirror editors in the same html document. I am using Codemirror Version: 2.2 The way I am getting the different instances of codemirror is :
However I see that the history is shared between the different instances. In the codemirror.js I see that the instance does not get a new history object.
I need to be able to track the history of each codemirror instance separately. Is there a way I can do that? Is there a different way of instantiating codemirror so that I can get a separate history per instance?
Will appreciate any help on this.
Thanks, Ananya