Save CM instances into session storage?

Hi, currently i’m making a code editor and i need t save CM instances somewhere. But i can’t save them. How would you do that?
I mean, I can’t use 1 editor for every file.
Also i want to save them like this:
var 1 = “hello”
myJson.1 = cmInst //Expected = myJson.hello
//Real: myJson.1

1 Like

Session storage stores strings, so you won’t be able to store objects like editor instances there.

I solved it by creating an object.