Repository navigation
·
1 commit
to main
since this release
- RR-98: the source pane's Cmd/Ctrl+Z and Cmd/Ctrl+Shift+Z (Ctrl+Y) now undo and redo a
pane.replaceDocumentload, andreplaceDocumentkeeps the original YAML or Markdown text. The keys first undo the text typed in the pane with CodeMirror's history (which a load, and a session Undo, Redo or restore, now clear); when that has nothing left they step the session over the whole-document replace, as the Undo and Redo buttons do, so the previous text comes back byte for byte (an edit made elsewhere stops the key).replaceDocument(document, { source, format })acceptssourceas JSON, YAML or Markdown text (formatsays which; inferred as the first of JSON, the pane's format, YAML and Markdown that reads as exactly the document) and shows those bytes, comments included, in a pane in that format, in Undo and Redo and when the format is switched to it; asourcethat is not this document is ignored and an unknownformatthrows aTypeError.mountJsonCodeEditorgainshistoryFallback,resetHistory()andundoDepth().