rename .json() to .getJSON() and .html() to .getHTML(), fix #22, fix #23

This commit is contained in:
Philipp Kühn
2020-10-23 11:58:00 +02:00
parent 5481787077
commit f37e6da902
23 changed files with 54 additions and 54 deletions

View File

@@ -376,14 +376,14 @@ export class Editor extends EventEmitter {
/**
* Get the document as JSON.
*/
public json() {
public getJSON() {
return this.state.doc.toJSON()
}
/**
* Get the document as HTML.
*/
public html() {
public getHTML() {
return getHtmlFromFragment(this.state.doc, this.schema)
}