marijnh/CodeMirror — pull request #2648 by jonegerton (2014-06-20 15:19:26+00:00)
Title: Allow overriding of the value when using fromTextArea

Allow overriding of the value when using fromTextArea, both on initialization, and on saving the data back to the textarea.

This is useful when the format of the value in the textarea needs to be different from that shown in the editor, for example when escaping/encoding html/xml, or if the textarea value contains additional data that isn't suitable for user display.

In some situations doing so when the request is submitted, or on page load can be tricky, for example when using CodeMirror using in conjunction with other frameworks that bind directly to the value of the input.