This commit is contained in:
@@ -11,7 +11,7 @@ context('/examples/export-html-or-json', () => {
|
||||
|
||||
it('should return json', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
const json = editor.json()
|
||||
const json = editor.getJSON()
|
||||
|
||||
expect(json).to.deep.equal({
|
||||
type: 'document',
|
||||
@@ -32,7 +32,7 @@ context('/examples/export-html-or-json', () => {
|
||||
|
||||
it('should return html', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
const html = editor.html()
|
||||
const html = editor.getHTML()
|
||||
|
||||
expect(html).to.equal('<p>Example Text</p>')
|
||||
})
|
||||
|
||||
@@ -50,13 +50,13 @@ export default {
|
||||
})
|
||||
|
||||
// Get the initial content …
|
||||
this.json = this.editor.json()
|
||||
this.html = this.editor.html()
|
||||
this.json = this.editor.getJSON()
|
||||
this.html = this.editor.getHTML()
|
||||
|
||||
// … and get the content after every change.
|
||||
this.editor.on('update', () => {
|
||||
this.json = this.editor.json()
|
||||
this.html = this.editor.html()
|
||||
this.json = this.editor.getJSON()
|
||||
this.html = this.editor.getHTML()
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user