diff --git a/docs/src/demos/Extensions/Document/index.spec.js b/docs/src/demos/Extensions/Document/index.spec.js index 85a66e41..91a6553e 100644 --- a/docs/src/demos/Extensions/Document/index.spec.js +++ b/docs/src/demos/Extensions/Document/index.spec.js @@ -1,37 +1,5 @@ -context('/api/extensions/bold', () => { +context('/api/extensions/document', () => { beforeEach(() => { - cy.visit('/api/extensions/bold') - - cy.get('.ProseMirror').window().then(window => { - const { editor } = window - editor.setContent('

Example Text

') - editor.focus().selectAll() - }) - }) - - describe('bold', () => { - it('the button should make the selected text bold', () => { - cy.get('.demo__preview button:first').click({ force: true }) - cy.get('.ProseMirror').contains('strong', 'Example Text') - }) - - it('the button should toggle the selected text bold', () => { - cy.get('.demo__preview button:first').dblclick({ force: true }) - cy.get('.ProseMirror strong').should('not.exist') - }) - - it('the keyboard shortcut should make the selected text bold', () => { - const shortcut = Cypress.platform === 'darwin' ? '{meta}b' : '{ctrl}b' - - cy.get('.ProseMirror').type(shortcut, {force: true}) - cy.get('.ProseMirror').contains('strong', 'Example Text') - }) - - it('the keyboard shortcut should toggle the selected text bold', () => { - const shortcut = Cypress.platform === 'darwin' ? '{meta}b' : '{ctrl}b' - - cy.get('.ProseMirror').type(shortcut, {force: true}).type(shortcut, {force: true}) - cy.get('.ProseMirror strong').should('not.exist') - }) + cy.visit('/api/extensions/document') }) }) \ No newline at end of file diff --git a/docs/src/demos/Extensions/Paragraph/index.spec.js b/docs/src/demos/Extensions/Paragraph/index.spec.js new file mode 100644 index 00000000..682369eb --- /dev/null +++ b/docs/src/demos/Extensions/Paragraph/index.spec.js @@ -0,0 +1,5 @@ +context('/api/extensions/paragraph', () => { + beforeEach(() => { + cy.visit('/api/extensions/paragraph') + }) +}) \ No newline at end of file diff --git a/docs/src/demos/Extensions/Paragraph/index.vue b/docs/src/demos/Extensions/Paragraph/index.vue new file mode 100644 index 00000000..bcd93f03 --- /dev/null +++ b/docs/src/demos/Extensions/Paragraph/index.vue @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/docs/src/docPages/api/extensions/paragraph.md b/docs/src/docPages/api/extensions/paragraph.md index 73036543..c54fde67 100644 --- a/docs/src/docPages/api/extensions/paragraph.md +++ b/docs/src/docPages/api/extensions/paragraph.md @@ -1,2 +1,17 @@ # Paragraph -Enables you to use paragraphs in the editor. \ No newline at end of file +Enables you to use paragraphs in the editor. + +## Options +*None* + +## Commands +*None* + +## Keybindings +*None* + +## Source Code +[packages/extension-paragraph/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-paragraph/) + +## Usage +