When I load a script into codemirror it looks like this.
But when I use CTRL + Z to undo something and I use it one time to much then all formatting gets lost and everything is placed one one line. Is there a way to prevent this?
Yes this is codemirror 5, I just used the latest source from GitHub. I also found another post here that had the same problem and fixed it by adding the historyKeymap but I have no idea how to do that. Already was looking in the codemirror manuals but found nothing so far.