Skip to content

@openpresentation/opf-editor 0.25.3

Latest

Choose a tag to compare

@github-actions github-actions released this 22 Oct 06:10
· 1 commit to main since this release
4f66349
  • RR-98: the source pane's Cmd/Ctrl+Z and Cmd/Ctrl+Shift+Z (Ctrl+Y) now undo and redo a pane.replaceDocument load, and replaceDocument keeps 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 }) accepts source as JSON, YAML or Markdown text (format says 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; a source that is not this document is ignored and an unknown format throws a TypeError. mountJsonCodeEditor gains historyFallback, resetHistory() and undoDepth().