Is there a demo/example code to show loading a format other than HTML in the page?
I saw discussions saying it should be possible with format/schema, but sort of lost on how to actually implement it. My JSON is basically a mapping of portions of document that has their type [heading, paragraph, blockquote, etc], attributes [twitter type of Entities in objects] , and plain text.
Currently I run it through a ractivejs to turn it into HTML to hook it up, but would like to skip that step (if possible.)
You could write your own function that converts your format to a Node object representing the ProseMirror document it corresponds to. There’s no demo of that yet.
You can do var doc = pm.doc to save a snapshot of the document, then ctrl-a del to clear the editor, and then pm.setDoc(doc) to restore it. (That works for me – I just tested it.) Does that answer your question?