How I can save() all CodeMirror开发者_StackOverflow社区 textareas on one page?
You'd have to cache all CodeMirror instances in to an array, and then loop through that array save()
'ing each instance.
var CMInstances = [instance1, instance2, ..., instanceN];
for (instance in CMInstances) {
instance.save();
}
I'd assume at some point in your script you're setting up your CodeMirror instances, so that point would be ideal to cache them.
精彩评论