///
Example Text
' const json = generateJSON(html, [Document, Paragraph, Text]) expect(JSON.stringify(json)).to.eq( JSON.stringify({ type: 'doc', content: [ { type: 'paragraph', content: [ { type: 'text', text: 'Example Text', }, ], }, ], }), ) }) // issue: https://github.com/ueberdosis/tiptap/issues/1601 it('generate JSON with style attributes', () => { const html = 'Example Text
' const json = generateJSON(html, [Document, Paragraph, Text, TextAlign.configure({ types: ['paragraph'] })]) expect(JSON.stringify(json)).to.eq( JSON.stringify({ type: 'doc', content: [ { type: 'paragraph', attrs: { textAlign: 'center', }, content: [ { type: 'text', text: 'Example Text', }, ], }, ], }), ) }) })