From e0c4db967472e1b87961e8b6f0002571011776ae Mon Sep 17 00:00:00 2001 From: Nick the Sick Date: Mon, 16 Sep 2024 06:19:37 +0200 Subject: [PATCH] revert: "fix(core): handle macOS text expansion properly in InputRules (#5261)" This reverts commit 88e310b144d36390f61364425ca32adf48e45505. --- .../React/index.spec.js | 4 +- .../React/index.spec.js | 21 +- .../Vue/index.spec.js | 5 +- .../MarkdownShortcuts/React/index.spec.js | 43 +- .../MarkdownShortcuts/Vue/index.spec.js | 43 +- .../src/Examples/Minimal/React/index.spec.js | 4 +- demos/src/Examples/Minimal/Vue/index.spec.js | 4 +- demos/src/Examples/Savvy/React/index.spec.js | 7 +- demos/src/Examples/Savvy/Vue/index.spec.js | 7 +- demos/src/Examples/Tasks/React/index.spec.js | 4 +- demos/src/Examples/Tasks/Vue/index.spec.js | 4 +- .../Experiments/Commands/Vue/index.spec.js | 11 +- .../Extensions/Typography/React/index.spec.js | 78 +-- .../Extensions/Typography/Vue/index.spec.js | 119 +++-- .../React/index.spec.js | 7 +- .../TypographyWithOverrides/Vue/index.spec.js | 7 +- .../GuideContent/ReadOnly/React/index.spec.js | 4 +- .../GuideContent/ReadOnly/Vue/index.spec.js | 4 +- demos/src/Marks/Bold/React/index.spec.js | 6 +- demos/src/Marks/Bold/Vue/index.spec.js | 8 +- demos/src/Marks/Code/React/index.spec.js | 3 +- demos/src/Marks/Code/Vue/index.spec.js | 3 +- demos/src/Marks/Italic/React/index.spec.js | 10 - demos/src/Marks/Italic/Vue/index.spec.js | 16 - demos/src/Marks/Strike/React/index.spec.js | 5 +- demos/src/Marks/Strike/Vue/index.spec.js | 3 +- .../src/Nodes/Blockquote/React/index.spec.js | 3 +- demos/src/Nodes/Blockquote/Vue/index.spec.js | 3 +- .../src/Nodes/BulletList/React/index.spec.js | 28 +- demos/src/Nodes/BulletList/Vue/index.spec.js | 28 +- demos/src/Nodes/CodeBlock/React/index.spec.js | 25 +- demos/src/Nodes/CodeBlock/Vue/index.spec.js | 28 +- demos/src/Nodes/Heading/React/index.spec.js | 21 +- demos/src/Nodes/Heading/Vue/index.spec.js | 24 +- .../Nodes/HorizontalRule/React/index.spec.js | 4 +- .../Nodes/HorizontalRule/Vue/index.spec.js | 4 +- .../src/Nodes/OrderedList/React/index.spec.js | 24 +- demos/src/Nodes/OrderedList/Vue/index.spec.js | 24 +- demos/src/Nodes/Paragraph/React/index.spec.js | 4 +- demos/src/Nodes/Paragraph/Vue/index.spec.js | 4 +- demos/src/Nodes/Table/React/index.spec.js | 4 +- demos/src/Nodes/Table/Vue/index.spec.js | 4 +- demos/src/Nodes/TaskList/React/index.spec.js | 18 +- demos/src/Nodes/TaskList/Vue/index.spec.js | 18 +- demos/src/Nodes/Text/React/index.spec.js | 4 +- demos/src/Nodes/Text/Vue/index.spec.js | 4 +- package-lock.json | 482 +++++++++--------- package.json | 1 - packages/core/src/InputRule.ts | 25 +- tests/cypress/support/commands.js | 10 - 50 files changed, 604 insertions(+), 620 deletions(-) diff --git a/demos/src/Commands/InsertContentApplyingRules/React/index.spec.js b/demos/src/Commands/InsertContentApplyingRules/React/index.spec.js index 7fd1281099e..0cda50ace55 100644 --- a/demos/src/Commands/InsertContentApplyingRules/React/index.spec.js +++ b/demos/src/Commands/InsertContentApplyingRules/React/index.spec.js @@ -4,7 +4,9 @@ context('/src/Commands/InsertContentApplyingRules/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should apply list InputRule', () => { diff --git a/demos/src/Examples/InteractivityComponentContent/React/index.spec.js b/demos/src/Examples/InteractivityComponentContent/React/index.spec.js index ae3a4cc5182..5ba739f560f 100644 --- a/demos/src/Examples/InteractivityComponentContent/React/index.spec.js +++ b/demos/src/Examples/InteractivityComponentContent/React/index.spec.js @@ -4,19 +4,19 @@ context('/src/Examples/InteractivityComponentContent/React/', () => { }) it('should have a working tiptap instance', () => { - cy.get('.tiptap').then(([{ editor }]) => { + cy.get('.ProseMirror').then(([{ editor }]) => { // eslint-disable-next-line expect(editor).to.not.be.null }) }) it('should render a custom node', () => { - cy.get('.tiptap .react-component') + cy.get('.ProseMirror .react-component') .should('have.length', 1) }) it('should allow text editing inside component', () => { - cy.get('.tiptap .react-component .content div') + cy.get('.ProseMirror .react-component .content div') .invoke('attr', 'contentEditable', true) .invoke('text', '') .type('Hello World!') @@ -24,27 +24,24 @@ context('/src/Examples/InteractivityComponentContent/React/', () => { }) it('should allow text editing inside component with markdown text', () => { - cy.get('.tiptap .react-component .content div') + cy.get('.ProseMirror .react-component .content div') .invoke('attr', 'contentEditable', true) .invoke('text', '') - .click() - cy.get('.tiptap .react-component .content div') - .realType('Hello World! This is **bold**.') - cy.get('.tiptap .react-component .content div') + .type('Hello World! This is **bold**.') .should('have.text', 'Hello World! This is bold.') - cy.get('.tiptap .react-component .content strong') + cy.get('.ProseMirror .react-component .content strong') .should('exist') }) it('should remove node via selectall', () => { - cy.get('.tiptap .react-component') + cy.get('.ProseMirror .react-component') .should('have.length', 1) - cy.get('.tiptap') + cy.get('.ProseMirror') .type('{selectall}{backspace}') - cy.get('.tiptap .react-component') + cy.get('.ProseMirror .react-component') .should('have.length', 0) }) }) diff --git a/demos/src/Examples/InteractivityComponentContent/Vue/index.spec.js b/demos/src/Examples/InteractivityComponentContent/Vue/index.spec.js index 75144bf672a..b0ca7757184 100644 --- a/demos/src/Examples/InteractivityComponentContent/Vue/index.spec.js +++ b/demos/src/Examples/InteractivityComponentContent/Vue/index.spec.js @@ -27,10 +27,7 @@ context('/src/Examples/InteractivityComponentContent/Vue/', () => { cy.get('.tiptap .vue-component .content') .invoke('attr', 'contentEditable', true) .invoke('text', '') - .click() - cy.get('.tiptap .vue-component .content') - .realType('Hello World! This is **bold**.') - cy.get('.tiptap .vue-component .content') + .type('Hello World! This is **bold**.') .should('have.text', 'Hello World! This is bold.') cy.get('.tiptap .vue-component .content strong') diff --git a/demos/src/Examples/MarkdownShortcuts/React/index.spec.js b/demos/src/Examples/MarkdownShortcuts/React/index.spec.js index 64c04512d57..e76bdade9fa 100644 --- a/demos/src/Examples/MarkdownShortcuts/React/index.spec.js +++ b/demos/src/Examples/MarkdownShortcuts/React/index.spec.js @@ -4,109 +4,98 @@ context('/src/Examples/MarkdownShortcuts/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should make a h1', () => { cy.get('.tiptap') - .realType('# Headline') - cy.get('.tiptap') + .type('# Headline') .find('h1') .should('contain', 'Headline') }) it('should make a h2', () => { cy.get('.tiptap') - .realType('## Headline') - cy.get('.tiptap') + .type('## Headline') .find('h2') .should('contain', 'Headline') }) it('should make a h3', () => { cy.get('.tiptap') - .realType('### Headline') - cy.get('.tiptap') + .type('### Headline') .find('h3') .should('contain', 'Headline') }) it('should make a h4', () => { cy.get('.tiptap') - .realType('#### Headline') - cy.get('.tiptap') + .type('#### Headline') .find('h4') .should('contain', 'Headline') }) it('should make a h5', () => { cy.get('.tiptap') - .realType('##### Headline') - cy.get('.tiptap') + .type('##### Headline') .find('h5') .should('contain', 'Headline') }) it('should make a h6', () => { cy.get('.tiptap') - .realType('###### Headline') - cy.get('.tiptap') + .type('###### Headline') .find('h6') .should('contain', 'Headline') }) it('should create inline code', () => { cy.get('.tiptap') - .realType('`$foobar`') - cy.get('.tiptap') + .type('`$foobar`') .find('code') .should('contain', '$foobar') }) it('should create a code block without language', () => { cy.get('.tiptap') - .realType('``` {enter}const foo = bar{enter}```') - cy.get('.tiptap') + .type('``` {enter}const foo = bar{enter}```') .find('pre') .should('contain', 'const foo = bar') }) it('should create a bullet list from asteriks', () => { cy.get('.tiptap') - .realType('* foobar') - cy.get('.tiptap') + .type('* foobar') .find('ul') .should('contain', 'foobar') }) it('should create a bullet list from dashes', () => { cy.get('.tiptap') - .realType('- foobar') - cy.get('.tiptap') + .type('- foobar') .find('ul') .should('contain', 'foobar') }) it('should create a bullet list from pluses', () => { cy.get('.tiptap') - .realType('+ foobar') - cy.get('.tiptap') + .type('+ foobar') .find('ul') .should('contain', 'foobar') }) it('should create a ordered list', () => { cy.get('.tiptap') - .realType('1. foobar') - cy.get('.tiptap') + .type('1. foobar') .find('ol') .should('contain', 'foobar') }) it('should create a blockquote', () => { cy.get('.tiptap') - .realType('> foobar') - cy.get('.tiptap') + .type('> foobar') .find('blockquote') .should('contain', 'foobar') }) diff --git a/demos/src/Examples/MarkdownShortcuts/Vue/index.spec.js b/demos/src/Examples/MarkdownShortcuts/Vue/index.spec.js index 1fe5b79b66e..b4df4148f11 100644 --- a/demos/src/Examples/MarkdownShortcuts/Vue/index.spec.js +++ b/demos/src/Examples/MarkdownShortcuts/Vue/index.spec.js @@ -4,109 +4,98 @@ context('/src/Examples/MarkdownShortcuts/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should make a h1', () => { cy.get('.tiptap') - .realType('# Headline') - cy.get('.tiptap') + .type('# Headline') .find('h1') .should('contain', 'Headline') }) it('should make a h2', () => { cy.get('.tiptap') - .realType('## Headline') - cy.get('.tiptap') + .type('## Headline') .find('h2') .should('contain', 'Headline') }) it('should make a h3', () => { cy.get('.tiptap') - .realType('### Headline') - cy.get('.tiptap') + .type('### Headline') .find('h3') .should('contain', 'Headline') }) it('should make a h4', () => { cy.get('.tiptap') - .realType('#### Headline') - cy.get('.tiptap') + .type('#### Headline') .find('h4') .should('contain', 'Headline') }) it('should make a h5', () => { cy.get('.tiptap') - .realType('##### Headline') - cy.get('.tiptap') + .type('##### Headline') .find('h5') .should('contain', 'Headline') }) it('should make a h6', () => { cy.get('.tiptap') - .realType('###### Headline') - cy.get('.tiptap') + .type('###### Headline') .find('h6') .should('contain', 'Headline') }) it('should create inline code', () => { cy.get('.tiptap') - .realType('`$foobar`') - cy.get('.tiptap') + .type('`$foobar`') .find('code') .should('contain', '$foobar') }) it('should create a code block without language', () => { cy.get('.tiptap') - .realType('``` {enter}const foo = bar{enter}```') - cy.get('.tiptap') + .type('``` {enter}const foo = bar{enter}```') .find('pre') .should('contain', 'const foo = bar') }) it('should create a bullet list from asteriks', () => { cy.get('.tiptap') - .realType('* foobar') - cy.get('.tiptap') + .type('* foobar') .find('ul') .should('contain', 'foobar') }) it('should create a bullet list from dashes', () => { cy.get('.tiptap') - .realType('- foobar') - cy.get('.tiptap') + .type('- foobar') .find('ul') .should('contain', 'foobar') }) it('should create a bullet list from pluses', () => { cy.get('.tiptap') - .realType('+ foobar') - cy.get('.tiptap') + .type('+ foobar') .find('ul') .should('contain', 'foobar') }) it('should create a ordered list', () => { cy.get('.tiptap') - .realType('1. foobar') - cy.get('.tiptap') + .type('1. foobar') .find('ol') .should('contain', 'foobar') }) it('should create a blockquote', () => { cy.get('.tiptap') - .realType('> foobar') - cy.get('.tiptap') + .type('> foobar') .find('blockquote') .should('contain', 'foobar') }) diff --git a/demos/src/Examples/Minimal/React/index.spec.js b/demos/src/Examples/Minimal/React/index.spec.js index 74d2c27719f..cd2f48251a0 100644 --- a/demos/src/Examples/Minimal/React/index.spec.js +++ b/demos/src/Examples/Minimal/React/index.spec.js @@ -4,7 +4,9 @@ context('/src/Examples/Minimal/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('text should be wrapped in a paragraph by default', () => { diff --git a/demos/src/Examples/Minimal/Vue/index.spec.js b/demos/src/Examples/Minimal/Vue/index.spec.js index 0a7dd7417a3..1089af86015 100644 --- a/demos/src/Examples/Minimal/Vue/index.spec.js +++ b/demos/src/Examples/Minimal/Vue/index.spec.js @@ -4,7 +4,9 @@ context('/src/Examples/Minimal/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('text should be wrapped in a paragraph by default', () => { diff --git a/demos/src/Examples/Savvy/React/index.spec.js b/demos/src/Examples/Savvy/React/index.spec.js index 6ea7cc16b65..1cef895d20c 100644 --- a/demos/src/Examples/Savvy/React/index.spec.js +++ b/demos/src/Examples/Savvy/React/index.spec.js @@ -4,7 +4,9 @@ context('/src/Examples/Savvy/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) const tests = [ @@ -22,8 +24,7 @@ context('/src/Examples/Savvy/React/', () => { tests.forEach(test => { it(`should parse ${test[0]} correctly`, () => { - cy.get('.tiptap').realType(`${test[0]} `) - cy.get('.tiptap').should('contain', test[1]) + cy.get('.tiptap').type(`${test[0]} `).should('contain', test[1]) }) }) diff --git a/demos/src/Examples/Savvy/Vue/index.spec.js b/demos/src/Examples/Savvy/Vue/index.spec.js index 88327d5b417..e604c398dbe 100644 --- a/demos/src/Examples/Savvy/Vue/index.spec.js +++ b/demos/src/Examples/Savvy/Vue/index.spec.js @@ -4,7 +4,9 @@ context('/src/Examples/Savvy/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) const tests = [ @@ -23,8 +25,7 @@ context('/src/Examples/Savvy/Vue/', () => { tests.forEach(test => { it(`should parse ${test[0]} correctly`, () => { cy.get('.tiptap') - .realType(`${test[0]} `) - cy.get('.tiptap') + .type(`${test[0]} `) .should('contain', test[1]) }) }) diff --git a/demos/src/Examples/Tasks/React/index.spec.js b/demos/src/Examples/Tasks/React/index.spec.js index e967dca26f4..60ac56bfc5d 100644 --- a/demos/src/Examples/Tasks/React/index.spec.js +++ b/demos/src/Examples/Tasks/React/index.spec.js @@ -4,7 +4,9 @@ context('/src/Examples/Tasks/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should always use task items', () => { diff --git a/demos/src/Examples/Tasks/Vue/index.spec.js b/demos/src/Examples/Tasks/Vue/index.spec.js index dcc1e452c6b..eeea16358ba 100644 --- a/demos/src/Examples/Tasks/Vue/index.spec.js +++ b/demos/src/Examples/Tasks/Vue/index.spec.js @@ -4,7 +4,9 @@ context('/src/Examples/Tasks/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should always use task items', () => { diff --git a/demos/src/Experiments/Commands/Vue/index.spec.js b/demos/src/Experiments/Commands/Vue/index.spec.js index e467db26dd4..8f310f27976 100644 --- a/demos/src/Experiments/Commands/Vue/index.spec.js +++ b/demos/src/Experiments/Commands/Vue/index.spec.js @@ -4,7 +4,9 @@ context('/src/Experiments/Commands/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should open a popup after typing a slash', () => { @@ -16,8 +18,7 @@ context('/src/Experiments/Commands/Vue/', () => { ] items.forEach((item, i) => { - cy.get('.tiptap').type('{selectall}{backspace}') - cy.get('.tiptap').realType('/') + cy.get('.tiptap').type('{selectall}{backspace}/') cy.get('.tippy-content .dropdown-menu').should('exist') cy.get('.tippy-content .dropdown-menu button').eq(i).click() cy.get('.tiptap').type(`I am a ${item.tag}`) @@ -26,14 +27,14 @@ context('/src/Experiments/Commands/Vue/', () => { }) it('should close the popup without any command via esc', () => { - cy.get('.tiptap').realType('/') + cy.get('.tiptap').type('{selectall}{backspace}/') cy.get('.tippy-content .dropdown-menu').should('exist') cy.get('.tiptap').type('{esc}') cy.get('.tippy-content .dropdown-menu').should('not.exist') }) it('should open the popup when the cursor is after a slash', () => { - cy.get('.tiptap').realType('/') + cy.get('.tiptap').type('{selectall}{backspace}/') cy.get('.tippy-content .dropdown-menu').should('exist') cy.get('.tiptap').type('{leftArrow}') cy.get('.tippy-content .dropdown-menu').should('not.exist') diff --git a/demos/src/Extensions/Typography/React/index.spec.js b/demos/src/Extensions/Typography/React/index.spec.js index 7c36ddb7064..b99b282236d 100644 --- a/demos/src/Extensions/Typography/React/index.spec.js +++ b/demos/src/Extensions/Typography/React/index.spec.js @@ -4,121 +4,99 @@ context('/src/Extensions/Typography/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should keep dates as they are', () => { - cy.get('.tiptap').realType('1/4/2024') - cy.get('.tiptap').should('contain', '1/4/2024') + cy.get('.tiptap').type('1/4/2024').should('contain', '1/4/2024') }) it('should make a fraction only with spaces afterwards', () => { - cy.get('.tiptap').realType('1/4') - cy.get('.tiptap').should('contain', '1/4') - - cy.get('.tiptap').type('{selectall}{backspace}') - - cy.get('.tiptap').realType('1/4 ') - cy.get('.tiptap').should('contain', '¼') + cy.get('.tiptap').type('1/4').should('contain', '1/4') + cy.get('.tiptap').type('{selectall}{backspace}1/4 ').should('contain', '¼') }) it('should make an em dash from two dashes', () => { - cy.get('.tiptap').realType('-- emDash') - cy.get('.tiptap').should('contain', '— emDash') + cy.get('.tiptap').type('-- emDash').should('contain', '— emDash') }) it('should make an ellipsis from three dots', () => { - cy.get('.tiptap').realType('... ellipsis') - cy.get('.tiptap').should('contain', '… ellipsis') + cy.get('.tiptap').type('... ellipsis').should('contain', '… ellipsis') }) it('should make a correct open double quote', () => { - cy.get('.tiptap').realType('"openDoubleQuote"') - cy.get('.tiptap').should('contain', '“openDoubleQuote') + cy.get('.tiptap').type('"openDoubleQuote"').should('contain', '“openDoubleQuote') }) it('should make a correct close double quote', () => { - cy.get('.tiptap').realType('"closeDoubleQuote"') - cy.get('.tiptap').should('contain', 'closeDoubleQuote”') + cy.get('.tiptap').type('"closeDoubleQuote"').should('contain', 'closeDoubleQuote”') }) it('should make a correct open single quote', () => { - cy.get('.tiptap').realType("'openSingleQuote'") - cy.get('.tiptap').should('contain', '‘openSingleQuote’') + cy.get('.tiptap').type("'openSingleQuote'").should('contain', '‘openSingleQuote’') }) it('should make a correct close single quote', () => { - cy.get('.tiptap').realType("'closeSingleQuote'") - cy.get('.tiptap').should('contain', 'closeSingleQuote’') + cy.get('.tiptap').type("'closeSingleQuote'").should('contain', 'closeSingleQuote’') }) it('should make a left arrow', () => { - cy.get('.tiptap').realType('<- leftArrow') - cy.get('.tiptap').should('contain', '← leftArrow') + cy.get('.tiptap').type('<- leftArrow').should('contain', '← leftArrow') }) it('should make a right arrow', () => { - cy.get('.tiptap').realType('-> rightArrow') - cy.get('.tiptap').should('contain', '→ rightArrow') + cy.get('.tiptap').type('-> rightArrow').should('contain', '→ rightArrow') }) it('should make a copyright sign', () => { - cy.get('.tiptap').realType('(c) copyright') - cy.get('.tiptap').should('contain', '© copyright') + cy.get('.tiptap').type('(c) copyright').should('contain', '© copyright') }) it('should make a registered trademark sign', () => { - cy.get('.tiptap').realType('(r) registeredTrademark') - cy.get('.tiptap').should('contain', '® registeredTrademark') + cy.get('.tiptap') + .type('(r) registeredTrademark') + .should('contain', '® registeredTrademark') }) it('should make a trademark sign', () => { - cy.get('.tiptap').realType('(tm) trademark') - cy.get('.tiptap').should('contain', '™ trademark') + cy.get('.tiptap').type('(tm) trademark').should('contain', '™ trademark') }) it('should make a one half', () => { - cy.get('.tiptap').realType('1/2 oneHalf') - cy.get('.tiptap').should('contain', '½ oneHalf') + cy.get('.tiptap').type('1/2 oneHalf').should('contain', '½ oneHalf') }) it('should make a plus/minus sign', () => { - cy.get('.tiptap').realType('+/- plusMinus') - cy.get('.tiptap').should('contain', '± plusMinus') + cy.get('.tiptap').type('+/- plusMinus').should('contain', '± plusMinus') }) it('should make a not equal sign', () => { - cy.get('.tiptap').realType('!= notEqual') - cy.get('.tiptap').should('contain', '≠ notEqual') + cy.get('.tiptap').type('!= notEqual').should('contain', '≠ notEqual') }) it('should make a laquo', () => { - cy.get('.tiptap').realType('<< laquorow') - cy.get('.tiptap').should('contain', '« laquo') + cy.get('.tiptap').type('<< laquorow').should('contain', '« laquo') }) it('should make a raquo', () => { - cy.get('.tiptap').realType('>> raquorow') - cy.get('.tiptap').should('contain', '» raquo') + cy.get('.tiptap').type('>> raquorow').should('contain', '» raquo') }) it('should make a multiplication sign from an asterisk', () => { - cy.get('.tiptap').realType('1*1 multiplication') - cy.get('.tiptap').should('contain', '1×1 multiplication') + cy.get('.tiptap').type('1*1 multiplication').should('contain', '1×1 multiplication') }) it('should make a multiplication sign from an x', () => { - cy.get('.tiptap').realType('1x1 multiplication') - cy.get('.tiptap').should('contain', '1×1 multiplication') + cy.get('.tiptap').type('1x1 multiplication').should('contain', '1×1 multiplication') }) it('should make a multiplication sign from an asterisk with spaces', () => { - cy.get('.tiptap').realType('1 * 1 multiplication') - cy.get('.tiptap').should('contain', '1 × 1 multiplication') + cy.get('.tiptap').type('1 * 1 multiplication').should('contain', '1 × 1 multiplication') }) it('should make a multiplication sign from an x with spaces', () => { - cy.get('.tiptap').realType('1 x 1 multiplication') - cy.get('.tiptap').should('contain', '1 × 1 multiplication') + cy.get('.tiptap').type('1 x 1 multiplication').should('contain', '1 × 1 multiplication') }) }) diff --git a/demos/src/Extensions/Typography/Vue/index.spec.js b/demos/src/Extensions/Typography/Vue/index.spec.js index 86e21c2bec6..2cba19876cb 100644 --- a/demos/src/Extensions/Typography/Vue/index.spec.js +++ b/demos/src/Extensions/Typography/Vue/index.spec.js @@ -4,121 +4,128 @@ context('/src/Extensions/Typography/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() - }) - - it('should keep dates as they are', () => { - cy.get('.tiptap').realType('1/4/2024') - cy.get('.tiptap').should('contain', '1/4/2024') - }) - - it('should make a fraction only with spaces afterwards', () => { - cy.get('.tiptap').realType('1/4') - cy.get('.tiptap').should('contain', '1/4') - - cy.get('.tiptap').type('{selectall}{backspace}') - - cy.get('.tiptap').realType('1/4 ') - cy.get('.tiptap').should('contain', '¼') + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should make an em dash from two dashes', () => { - cy.get('.tiptap').realType('-- emDash') - cy.get('.tiptap').should('contain', '— emDash') + cy.get('.tiptap') + .type('-- emDash') + .should('contain', '— emDash') }) it('should make an ellipsis from three dots', () => { - cy.get('.tiptap').realType('... ellipsis') - cy.get('.tiptap').should('contain', '… ellipsis') + cy.get('.tiptap') + .type('... ellipsis') + .should('contain', '… ellipsis') }) it('should make a correct open double quote', () => { - cy.get('.tiptap').realType('"openDoubleQuote"') - cy.get('.tiptap').should('contain', '“openDoubleQuote') + cy.get('.tiptap') + .type('"openDoubleQuote"') + .should('contain', '“openDoubleQuote') }) it('should make a correct close double quote', () => { - cy.get('.tiptap').realType('"closeDoubleQuote"') - cy.get('.tiptap').should('contain', 'closeDoubleQuote”') + cy.get('.tiptap') + .type('"closeDoubleQuote"') + .should('contain', 'closeDoubleQuote”') }) it('should make a correct open single quote', () => { - cy.get('.tiptap').realType("'openSingleQuote'") - cy.get('.tiptap').should('contain', '‘openSingleQuote’') + cy.get('.tiptap') + .type("'openSingleQuote'") + .should('contain', '‘openSingleQuote’') }) it('should make a correct close single quote', () => { - cy.get('.tiptap').realType("'closeSingleQuote'") - cy.get('.tiptap').should('contain', 'closeSingleQuote’') + cy.get('.tiptap') + .type("'closeSingleQuote'") + .should('contain', 'closeSingleQuote’') }) it('should make a left arrow', () => { - cy.get('.tiptap').realType('<- leftArrow') - cy.get('.tiptap').should('contain', '← leftArrow') + cy.get('.tiptap') + .type('<- leftArrow') + .should('contain', '← leftArrow') }) it('should make a right arrow', () => { - cy.get('.tiptap').realType('-> rightArrow') - cy.get('.tiptap').should('contain', '→ rightArrow') + cy.get('.tiptap') + .type('-> rightArrow') + .should('contain', '→ rightArrow') }) it('should make a copyright sign', () => { - cy.get('.tiptap').realType('(c) copyright') - cy.get('.tiptap').should('contain', '© copyright') + cy.get('.tiptap') + .type('(c) copyright') + .should('contain', '© copyright') }) it('should make a registered trademark sign', () => { - cy.get('.tiptap').realType('(r) registeredTrademark') - cy.get('.tiptap').should('contain', '® registeredTrademark') + cy.get('.tiptap') + .type('(r) registeredTrademark') + .should('contain', '® registeredTrademark') }) it('should make a trademark sign', () => { - cy.get('.tiptap').realType('(tm) trademark') - cy.get('.tiptap').should('contain', '™ trademark') + cy.get('.tiptap') + .type('(tm) trademark') + .should('contain', '™ trademark') }) it('should make a one half', () => { - cy.get('.tiptap').realType('1/2 oneHalf') - cy.get('.tiptap').should('contain', '½ oneHalf') + cy.get('.tiptap') + .type('1/2 oneHalf') + .should('contain', '½ oneHalf') }) it('should make a plus/minus sign', () => { - cy.get('.tiptap').realType('+/- plusMinus') - cy.get('.tiptap').should('contain', '± plusMinus') + cy.get('.tiptap') + .type('+/- plusMinus') + .should('contain', '± plusMinus') }) it('should make a not equal sign', () => { - cy.get('.tiptap').realType('!= notEqual') - cy.get('.tiptap').should('contain', '≠ notEqual') + cy.get('.tiptap') + .type('!= notEqual') + .should('contain', '≠ notEqual') }) it('should make a laquo', () => { - cy.get('.tiptap').realType('<< laquorow') - cy.get('.tiptap').should('contain', '« laquo') + cy.get('.tiptap') + .type('<< laquorow') + .should('contain', '« laquo') }) it('should make a raquo', () => { - cy.get('.tiptap').realType('>> raquorow') - cy.get('.tiptap').should('contain', '» raquo') + cy.get('.tiptap') + .type('>> raquorow') + .should('contain', '» raquo') }) it('should make a multiplication sign from an asterisk', () => { - cy.get('.tiptap').realType('1*1 multiplication') - cy.get('.tiptap').should('contain', '1×1 multiplication') + cy.get('.tiptap') + .type('1*1 multiplication') + .should('contain', '1×1 multiplication') }) it('should make a multiplication sign from an x', () => { - cy.get('.tiptap').realType('1x1 multiplication') - cy.get('.tiptap').should('contain', '1×1 multiplication') + cy.get('.tiptap') + .type('1x1 multiplication') + .should('contain', '1×1 multiplication') }) it('should make a multiplication sign from an asterisk with spaces', () => { - cy.get('.tiptap').realType('1 * 1 multiplication') - cy.get('.tiptap').should('contain', '1 × 1 multiplication') + cy.get('.tiptap') + .type('1 * 1 multiplication') + .should('contain', '1 × 1 multiplication') }) it('should make a multiplication sign from an x with spaces', () => { - cy.get('.tiptap').realType('1 x 1 multiplication') - cy.get('.tiptap').should('contain', '1 × 1 multiplication') + cy.get('.tiptap') + .type('1 x 1 multiplication') + .should('contain', '1 × 1 multiplication') }) }) diff --git a/demos/src/Extensions/TypographyWithOverrides/React/index.spec.js b/demos/src/Extensions/TypographyWithOverrides/React/index.spec.js index 0403cdb72f6..8f3f99625a5 100644 --- a/demos/src/Extensions/TypographyWithOverrides/React/index.spec.js +++ b/demos/src/Extensions/TypographyWithOverrides/React/index.spec.js @@ -4,11 +4,12 @@ context('/src/Extensions/TypographyWithOverrides/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should use correct override for rightArrow', () => { - cy.get('.tiptap').realType('-> Hello!') - cy.get('.tiptap').should('contain', '=====> Hello!') + cy.get('.tiptap').type('-> Hello!').should('contain', '=====> Hello!') }) }) diff --git a/demos/src/Extensions/TypographyWithOverrides/Vue/index.spec.js b/demos/src/Extensions/TypographyWithOverrides/Vue/index.spec.js index ccc06e78c35..ec4851792a1 100644 --- a/demos/src/Extensions/TypographyWithOverrides/Vue/index.spec.js +++ b/demos/src/Extensions/TypographyWithOverrides/Vue/index.spec.js @@ -4,11 +4,12 @@ context('/src/Extensions/TypographyWithOverrides/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should use correct override for rightArrow', () => { - cy.get('.tiptap').realType('-> Hello!') - cy.get('.tiptap').should('contain', '=====> Hello!') + cy.get('.tiptap').type('-> Hello!').should('contain', '=====> Hello!') }) }) diff --git a/demos/src/GuideContent/ReadOnly/React/index.spec.js b/demos/src/GuideContent/ReadOnly/React/index.spec.js index 51cff9d0cc3..c2448d7a1e0 100644 --- a/demos/src/GuideContent/ReadOnly/React/index.spec.js +++ b/demos/src/GuideContent/ReadOnly/React/index.spec.js @@ -4,7 +4,9 @@ context('/src/GuideContent/ReadOnly/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should be read-only', () => { diff --git a/demos/src/GuideContent/ReadOnly/Vue/index.spec.js b/demos/src/GuideContent/ReadOnly/Vue/index.spec.js index 4d644436e4a..0cd7e479576 100644 --- a/demos/src/GuideContent/ReadOnly/Vue/index.spec.js +++ b/demos/src/GuideContent/ReadOnly/Vue/index.spec.js @@ -4,7 +4,9 @@ context('/src/GuideContent/ReadOnly/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should be read-only', () => { diff --git a/demos/src/Marks/Bold/React/index.spec.js b/demos/src/Marks/Bold/React/index.spec.js index 1cebbf0543b..60649c5f530 100644 --- a/demos/src/Marks/Bold/React/index.spec.js +++ b/demos/src/Marks/Bold/React/index.spec.js @@ -72,12 +72,10 @@ context('/src/Marks/Bold/React/', () => { }) it('should make a bold text from the default markdown shortcut', () => { - cy.get('.tiptap').realType('**Bold**') - cy.get('.tiptap').find('strong').should('contain', 'Bold') + cy.get('.tiptap').type('**Bold**').find('strong').should('contain', 'Bold') }) it('should make a bold text from the alternative markdown shortcut', () => { - cy.get('.tiptap').realType('__Bold__') - cy.get('.tiptap').find('strong').should('contain', 'Bold') + cy.get('.tiptap').type('__Bold__').find('strong').should('contain', 'Bold') }) }) diff --git a/demos/src/Marks/Bold/Vue/index.spec.js b/demos/src/Marks/Bold/Vue/index.spec.js index 1d91ed7b8ac..aaf7e4dddc5 100644 --- a/demos/src/Marks/Bold/Vue/index.spec.js +++ b/demos/src/Marks/Bold/Vue/index.spec.js @@ -77,15 +77,15 @@ context('/src/Marks/Bold/Vue/', () => { it('should make a bold text from the default markdown shortcut', () => { cy.get('.tiptap') - .realType('**Bold**') - cy.get('.tiptap').find('strong') + .type('**Bold**') + .find('strong') .should('contain', 'Bold') }) it('should make a bold text from the alternative markdown shortcut', () => { cy.get('.tiptap') - .realType('__Bold__') - cy.get('.tiptap').find('strong') + .type('__Bold__') + .find('strong') .should('contain', 'Bold') }) }) diff --git a/demos/src/Marks/Code/React/index.spec.js b/demos/src/Marks/Code/React/index.spec.js index 6109741c2ee..2c79e91c200 100644 --- a/demos/src/Marks/Code/React/index.spec.js +++ b/demos/src/Marks/Code/React/index.spec.js @@ -55,7 +55,6 @@ context('/src/Marks/Code/React/', () => { }) it('should make inline code from the markdown shortcut', () => { - cy.get('.tiptap').realType('`Example`') - cy.get('.tiptap').find('code').should('contain', 'Example') + cy.get('.tiptap').type('`Example`').find('code').should('contain', 'Example') }) }) diff --git a/demos/src/Marks/Code/Vue/index.spec.js b/demos/src/Marks/Code/Vue/index.spec.js index 1a81eeb9f50..ac00ba2b4fa 100644 --- a/demos/src/Marks/Code/Vue/index.spec.js +++ b/demos/src/Marks/Code/Vue/index.spec.js @@ -64,8 +64,7 @@ context('/src/Marks/Code/Vue/', () => { it('should make inline code from the markdown shortcut', () => { cy.get('.tiptap') - .realType('`Example`') - cy.get('.tiptap') + .type('`Example`') .find('code') .should('contain', 'Example') }) diff --git a/demos/src/Marks/Italic/React/index.spec.js b/demos/src/Marks/Italic/React/index.spec.js index e15f0d465b1..1655950bb47 100644 --- a/demos/src/Marks/Italic/React/index.spec.js +++ b/demos/src/Marks/Italic/React/index.spec.js @@ -61,14 +61,4 @@ context('/src/Marks/Italic/React/', () => { .find('em') .should('not.exist') }) - - it('should make a italic text from the default markdown shortcut', () => { - cy.get('.tiptap').realType('*Italic*') - cy.get('.tiptap').find('em').should('contain', 'Italic') - }) - - it('should make a italic text from the alternative markdown shortcut', () => { - cy.get('.tiptap').realType('_Italic_') - cy.get('.tiptap').find('em').should('contain', 'Italic') - }) }) diff --git a/demos/src/Marks/Italic/Vue/index.spec.js b/demos/src/Marks/Italic/Vue/index.spec.js index 83e8cea56af..b3f8cde6646 100644 --- a/demos/src/Marks/Italic/Vue/index.spec.js +++ b/demos/src/Marks/Italic/Vue/index.spec.js @@ -68,20 +68,4 @@ context('/src/Marks/Italic/Vue/', () => { .find('em') .should('not.exist') }) - - it('should make a italic text from the default markdown shortcut', () => { - cy.get('.tiptap') - .realType('*Italic*') - cy.get('.tiptap') - .find('em') - .should('contain', 'Italic') - }) - - it('should make a italic text from the alternative markdown shortcut', () => { - cy.get('.tiptap') - .realType('_Italic_') - cy.get('.tiptap') - .find('em') - .should('contain', 'Italic') - }) }) diff --git a/demos/src/Marks/Strike/React/index.spec.js b/demos/src/Marks/Strike/React/index.spec.js index d2d8cc841b2..ad96ce17778 100644 --- a/demos/src/Marks/Strike/React/index.spec.js +++ b/demos/src/Marks/Strike/React/index.spec.js @@ -71,8 +71,7 @@ context('/src/Marks/Strike/React/', () => { .should('not.exist') }) - it.only('should make a striked text from the markdown shortcut', () => { - cy.get('.tiptap').realType('~~Strike~~') - cy.get('.tiptap').find('s').should('contain', 'Strike') + it('should make a striked text from the markdown shortcut', () => { + cy.get('.tiptap').type('~~Strike~~').find('s').should('contain', 'Strike') }) }) diff --git a/demos/src/Marks/Strike/Vue/index.spec.js b/demos/src/Marks/Strike/Vue/index.spec.js index bcfec97cba7..09b36dd691a 100644 --- a/demos/src/Marks/Strike/Vue/index.spec.js +++ b/demos/src/Marks/Strike/Vue/index.spec.js @@ -79,8 +79,7 @@ context('/src/Marks/Strike/Vue/', () => { it('should make a striked text from the markdown shortcut', () => { cy.get('.tiptap') - .realType('~~Strike~~') - cy.get('.tiptap') + .type('~~Strike~~') .find('s') .should('contain', 'Strike') }) diff --git a/demos/src/Nodes/Blockquote/React/index.spec.js b/demos/src/Nodes/Blockquote/React/index.spec.js index 1ac59016226..131eac18155 100644 --- a/demos/src/Nodes/Blockquote/React/index.spec.js +++ b/demos/src/Nodes/Blockquote/React/index.spec.js @@ -80,7 +80,6 @@ context('/src/Nodes/Blockquote/React/', () => { }) it('should make a blockquote from markdown shortcuts', () => { - cy.get('.tiptap').realType('> Quote') - cy.get('.tiptap').find('blockquote').should('contain', 'Quote') + cy.get('.tiptap').type('> Quote').find('blockquote').should('contain', 'Quote') }) }) diff --git a/demos/src/Nodes/Blockquote/Vue/index.spec.js b/demos/src/Nodes/Blockquote/Vue/index.spec.js index e7985d15deb..d8f1641d766 100644 --- a/demos/src/Nodes/Blockquote/Vue/index.spec.js +++ b/demos/src/Nodes/Blockquote/Vue/index.spec.js @@ -97,8 +97,7 @@ context('/src/Nodes/Blockquote/Vue/', () => { it('should make a blockquote from markdown shortcuts', () => { cy.get('.tiptap') - .realType('> Quote') - cy.get('.tiptap') + .type('> Quote') .find('blockquote') .should('contain', 'Quote') }) diff --git a/demos/src/Nodes/BulletList/React/index.spec.js b/demos/src/Nodes/BulletList/React/index.spec.js index 3e7b58236dc..d346ba67bcd 100644 --- a/demos/src/Nodes/BulletList/React/index.spec.js +++ b/demos/src/Nodes/BulletList/React/index.spec.js @@ -49,7 +49,9 @@ context('/src/Nodes/BulletList/React/', () => { }) it('should leave the list with double enter', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap').type('- List Item 1{enter}{enter}Paragraph') @@ -66,9 +68,11 @@ context('/src/Nodes/BulletList/React/', () => { }) it('should make a bullet list from an asterisk', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('* List Item 1{enter}List Item 2') + cy.get('.tiptap').type('* List Item 1{enter}List Item 2') cy.get('.tiptap').find('li:nth-child(1)').should('contain', 'List Item 1') @@ -76,9 +80,11 @@ context('/src/Nodes/BulletList/React/', () => { }) it('should make a bullet list from a dash', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('- List Item 1{enter}List Item 2') + cy.get('.tiptap').type('- List Item 1{enter}List Item 2') cy.get('.tiptap').find('li:nth-child(1)').should('contain', 'List Item 1') @@ -86,9 +92,11 @@ context('/src/Nodes/BulletList/React/', () => { }) it('should make a bullet list from a plus', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('+ List Item 1{enter}List Item 2') + cy.get('.tiptap').type('+ List Item 1{enter}List Item 2') cy.get('.tiptap').find('li:nth-child(1)').should('contain', 'List Item 1') @@ -96,9 +104,11 @@ context('/src/Nodes/BulletList/React/', () => { }) it('should remove the bullet list after pressing backspace', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('* {backspace}Example') + cy.get('.tiptap').type('* {backspace}Example') cy.get('.tiptap').find('p').should('contain', '* Example') }) diff --git a/demos/src/Nodes/BulletList/Vue/index.spec.js b/demos/src/Nodes/BulletList/Vue/index.spec.js index 4c2890f63b5..fa07cb344b7 100644 --- a/demos/src/Nodes/BulletList/Vue/index.spec.js +++ b/demos/src/Nodes/BulletList/Vue/index.spec.js @@ -62,7 +62,9 @@ context('/src/Nodes/BulletList/Vue/', () => { }) it('should leave the list with double enter', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') .type('- List Item 1{enter}{enter}Paragraph') @@ -85,10 +87,12 @@ context('/src/Nodes/BulletList/Vue/', () => { }) it('should make a bullet list from an asterisk', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('* List Item 1{enter}List Item 2') + .type('* List Item 1{enter}List Item 2') cy.get('.tiptap') .find('li:nth-child(1)') @@ -100,10 +104,12 @@ context('/src/Nodes/BulletList/Vue/', () => { }) it('should make a bullet list from a dash', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('- List Item 1{enter}List Item 2') + .type('- List Item 1{enter}List Item 2') cy.get('.tiptap') .find('li:nth-child(1)') @@ -115,10 +121,12 @@ context('/src/Nodes/BulletList/Vue/', () => { }) it('should make a bullet list from a plus', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('+ List Item 1{enter}List Item 2') + .type('+ List Item 1{enter}List Item 2') cy.get('.tiptap') .find('li:nth-child(1)') @@ -130,10 +138,12 @@ context('/src/Nodes/BulletList/Vue/', () => { }) it('should remove the bullet list after pressing backspace', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('* {backspace}Example') + .type('* {backspace}Example') cy.get('.tiptap') .find('p') diff --git a/demos/src/Nodes/CodeBlock/React/index.spec.js b/demos/src/Nodes/CodeBlock/React/index.spec.js index 2f8ad282074..2af0f2b306a 100644 --- a/demos/src/Nodes/CodeBlock/React/index.spec.js +++ b/demos/src/Nodes/CodeBlock/React/index.spec.js @@ -76,8 +76,7 @@ context('/src/Nodes/CodeBlock/React/', () => { cy.get('.tiptap').then(([{ editor }]) => { editor.commands.clearContent() - cy.get('.tiptap').realType('``` Code') - cy.get('.tiptap').find('pre>code').should('contain', 'Code') + cy.get('.tiptap').type('``` Code').find('pre>code').should('contain', 'Code') }) }) @@ -85,8 +84,7 @@ context('/src/Nodes/CodeBlock/React/', () => { cy.get('.tiptap').then(([{ editor }]) => { editor.commands.clearContent() - cy.get('.tiptap').realType('~~~ Code') - cy.get('.tiptap').find('pre>code').should('contain', 'Code') + cy.get('.tiptap').type('~~~ Code').find('pre>code').should('contain', 'Code') }) }) @@ -95,8 +93,8 @@ context('/src/Nodes/CodeBlock/React/', () => { editor.commands.clearContent() cy.get('.tiptap') - .realType('```js Code') - cy.get('.tiptap').find('pre>code.language-js') + .type('```js Code') + .find('pre>code.language-js') .should('contain', 'Code') }) }) @@ -106,8 +104,8 @@ context('/src/Nodes/CodeBlock/React/', () => { editor.commands.clearContent() cy.get('.tiptap') - .realType('~~~js Code') - cy.get('.tiptap').find('pre>code.language-js') + .type('~~~js Code') + .find('pre>code.language-js') .should('contain', 'Code') }) }) @@ -116,8 +114,7 @@ context('/src/Nodes/CodeBlock/React/', () => { cy.get('.tiptap').then(([{ editor }]) => { editor.commands.clearContent() - cy.get('.tiptap').realType('```{enter}Code') - cy.get('.tiptap').find('pre>code').should('contain', 'Code') + cy.get('.tiptap').type('```{enter}Code').find('pre>code').should('contain', 'Code') }) }) @@ -125,7 +122,7 @@ context('/src/Nodes/CodeBlock/React/', () => { cy.get('.tiptap').then(([{ editor }]) => { editor.commands.clearContent() - cy.get('.tiptap').realType('``` {backspace}') + cy.get('.tiptap').type('``` {backspace}') cy.get('.tiptap pre').should('not.exist') }) @@ -137,7 +134,7 @@ context('/src/Nodes/CodeBlock/React/', () => { cy.get('.tiptap pre').should('not.exist') - cy.get('.tiptap').realType('Paragraph{enter}``` A{backspace}{backspace}') + cy.get('.tiptap').type('Paragraph{enter}``` A{backspace}{backspace}') cy.get('.tiptap pre').should('not.exist') }) @@ -149,7 +146,7 @@ context('/src/Nodes/CodeBlock/React/', () => { cy.get('.tiptap pre').should('not.exist') - cy.get('.tiptap').realType('Paragraph{enter}{enter}``` A{backspace}{backspace}') + cy.get('.tiptap').type('Paragraph{enter}{enter}``` A{backspace}{backspace}') cy.get('.tiptap pre').should('not.exist') }) @@ -161,7 +158,7 @@ context('/src/Nodes/CodeBlock/React/', () => { cy.get('.tiptap pre').should('not.exist') - cy.get('.tiptap').realType('``` A{leftarrow}{backspace}') + cy.get('.tiptap').type('``` A{leftArrow}{backspace}') cy.get('.tiptap pre').should('not.exist') }) diff --git a/demos/src/Nodes/CodeBlock/Vue/index.spec.js b/demos/src/Nodes/CodeBlock/Vue/index.spec.js index 753a8c9ef83..9d8dd627d62 100644 --- a/demos/src/Nodes/CodeBlock/Vue/index.spec.js +++ b/demos/src/Nodes/CodeBlock/Vue/index.spec.js @@ -87,8 +87,8 @@ context('/src/Nodes/CodeBlock/Vue/', () => { editor.commands.clearContent() cy.get('.tiptap') - .realType('``` Code') - cy.get('.tiptap').find('pre>code') + .type('``` Code') + .find('pre>code') .should('contain', 'Code') }) }) @@ -98,8 +98,8 @@ context('/src/Nodes/CodeBlock/Vue/', () => { editor.commands.clearContent() cy.get('.tiptap') - .realType('~~~ Code') - cy.get('.tiptap').find('pre>code') + .type('~~~ Code') + .find('pre>code') .should('contain', 'Code') }) }) @@ -109,8 +109,8 @@ context('/src/Nodes/CodeBlock/Vue/', () => { editor.commands.clearContent() cy.get('.tiptap') - .realType('```js Code') - cy.get('.tiptap').find('pre>code.language-js') + .type('```js Code') + .find('pre>code.language-js') .should('contain', 'Code') }) }) @@ -120,8 +120,8 @@ context('/src/Nodes/CodeBlock/Vue/', () => { editor.commands.clearContent() cy.get('.tiptap') - .realType('~~~js Code') - cy.get('.tiptap').find('pre>code.language-js') + .type('~~~js Code') + .find('pre>code.language-js') .should('contain', 'Code') }) }) @@ -131,8 +131,8 @@ context('/src/Nodes/CodeBlock/Vue/', () => { editor.commands.clearContent() cy.get('.tiptap') - .realType('```{enter}Code') - cy.get('.tiptap').find('pre>code') + .type('```{enter}Code') + .find('pre>code') .should('contain', 'Code') }) }) @@ -142,7 +142,7 @@ context('/src/Nodes/CodeBlock/Vue/', () => { editor.commands.clearContent() cy.get('.tiptap') - .realType('``` {backspace}') + .type('``` {backspace}') cy.get('.tiptap pre') .should('not.exist') @@ -157,7 +157,7 @@ context('/src/Nodes/CodeBlock/Vue/', () => { .should('not.exist') cy.get('.tiptap') - .realType('Paragraph{enter}``` A{backspace}{backspace}') + .type('Paragraph{enter}``` A{backspace}{backspace}') cy.get('.tiptap pre') .should('not.exist') @@ -172,7 +172,7 @@ context('/src/Nodes/CodeBlock/Vue/', () => { .should('not.exist') cy.get('.tiptap') - .realType('Paragraph{enter}{enter}``` A{backspace}{backspace}') + .type('Paragraph{enter}{enter}``` A{backspace}{backspace}') cy.get('.tiptap pre') .should('not.exist') @@ -187,7 +187,7 @@ context('/src/Nodes/CodeBlock/Vue/', () => { .should('not.exist') cy.get('.tiptap') - .type('``` A{leftarrow}{backspace}') + .type('``` A{leftArrow}{backspace}') cy.get('.tiptap pre') .should('not.exist') diff --git a/demos/src/Nodes/Heading/React/index.spec.js b/demos/src/Nodes/Heading/React/index.spec.js index 72e8a161e3f..58dcf9f1866 100644 --- a/demos/src/Nodes/Heading/React/index.spec.js +++ b/demos/src/Nodes/Heading/React/index.spec.js @@ -86,23 +86,26 @@ context('/src/Nodes/Heading/React/', () => { }) it('should make a h1 from the default markdown shortcut', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('# Headline') - cy.get('.tiptap').find('h1').should('contain', 'Headline') + cy.get('.tiptap').type('# Headline').find('h1').should('contain', 'Headline') }) it('should make a h2 from the default markdown shortcut', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('## Headline') - cy.get('.tiptap').find('h2').should('contain', 'Headline') + cy.get('.tiptap').type('## Headline').find('h2').should('contain', 'Headline') }) it('should make a h3 from the default markdown shortcut', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('### Headline') - cy.get('.tiptap').find('h3').should('contain', 'Headline') + cy.get('.tiptap').type('### Headline').find('h3').should('contain', 'Headline') }) }) diff --git a/demos/src/Nodes/Heading/Vue/index.spec.js b/demos/src/Nodes/Heading/Vue/index.spec.js index 7dc64b7769e..2d49d09898c 100644 --- a/demos/src/Nodes/Heading/Vue/index.spec.js +++ b/demos/src/Nodes/Heading/Vue/index.spec.js @@ -108,29 +108,35 @@ context('/src/Nodes/Heading/Vue/', () => { }) it('should make a h1 from the default markdown shortcut', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('# Headline') - cy.get('.tiptap').find('h1') + .type('# Headline') + .find('h1') .should('contain', 'Headline') }) it('should make a h2 from the default markdown shortcut', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('## Headline') - cy.get('.tiptap').find('h2') + .type('## Headline') + .find('h2') .should('contain', 'Headline') }) it('should make a h3 from the default markdown shortcut', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('### Headline') - cy.get('.tiptap').find('h3') + .type('### Headline') + .find('h3') .should('contain', 'Headline') }) }) diff --git a/demos/src/Nodes/HorizontalRule/React/index.spec.js b/demos/src/Nodes/HorizontalRule/React/index.spec.js index 35cd3262e67..051182cef21 100644 --- a/demos/src/Nodes/HorizontalRule/React/index.spec.js +++ b/demos/src/Nodes/HorizontalRule/React/index.spec.js @@ -37,7 +37,7 @@ context('/src/Nodes/HorizontalRule/React/', () => { cy.get('.tiptap hr').should('not.exist') - cy.get('.tiptap').realType('---') + cy.get('.tiptap').type('---') cy.get('.tiptap hr').should('exist') }) @@ -49,7 +49,7 @@ context('/src/Nodes/HorizontalRule/React/', () => { cy.get('.tiptap hr').should('not.exist') - cy.get('.tiptap').realType('___ ') + cy.get('.tiptap').type('___ ') cy.get('.tiptap hr').should('exist') }) diff --git a/demos/src/Nodes/HorizontalRule/Vue/index.spec.js b/demos/src/Nodes/HorizontalRule/Vue/index.spec.js index 4a9c93632e9..69d1707b964 100644 --- a/demos/src/Nodes/HorizontalRule/Vue/index.spec.js +++ b/demos/src/Nodes/HorizontalRule/Vue/index.spec.js @@ -42,7 +42,7 @@ context('/src/Nodes/HorizontalRule/Vue/', () => { .should('not.exist') cy.get('.tiptap') - .realType('---') + .type('---') cy.get('.tiptap hr') .should('exist') @@ -57,7 +57,7 @@ context('/src/Nodes/HorizontalRule/Vue/', () => { .should('not.exist') cy.get('.tiptap') - .realType('___ ') + .type('___ ') cy.get('.tiptap hr') .should('exist') diff --git a/demos/src/Nodes/OrderedList/React/index.spec.js b/demos/src/Nodes/OrderedList/React/index.spec.js index 03ee1827644..79aa3b2fba9 100644 --- a/demos/src/Nodes/OrderedList/React/index.spec.js +++ b/demos/src/Nodes/OrderedList/React/index.spec.js @@ -56,9 +56,11 @@ context('/src/Nodes/OrderedList/React/', () => { }) it('should leave the list with double enter', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('1. List Item 1{enter}{enter}Paragraph') + cy.get('.tiptap').type('1. List Item 1{enter}{enter}Paragraph') cy.get('.tiptap').find('li').its('length').should('eq', 1) @@ -66,9 +68,11 @@ context('/src/Nodes/OrderedList/React/', () => { }) it('should make a ordered list from a number', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('1. List Item 1{enter}List Item 2') + cy.get('.tiptap').type('1. List Item 1{enter}List Item 2') cy.get('.tiptap').find('li:nth-child(1)').should('contain', 'List Item 1') @@ -76,18 +80,22 @@ context('/src/Nodes/OrderedList/React/', () => { }) it('should make a ordered list from a number other than number one', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('2. List Item 1{enter}List Item 2') + cy.get('.tiptap').type('2. List Item 1{enter}List Item 2') cy.get('.tiptap').find('li:nth-child(1)').should('contain', 'List Item 1') cy.get('.tiptap').find('li:nth-child(2)').should('contain', 'List Item 2') }) it('should remove the ordered list after pressing backspace', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('1. {backspace}Example') + cy.get('.tiptap').type('1. {backspace}Example') cy.get('.tiptap').find('p').should('contain', '1. Example') }) diff --git a/demos/src/Nodes/OrderedList/Vue/index.spec.js b/demos/src/Nodes/OrderedList/Vue/index.spec.js index e76764204ca..7014a358e73 100644 --- a/demos/src/Nodes/OrderedList/Vue/index.spec.js +++ b/demos/src/Nodes/OrderedList/Vue/index.spec.js @@ -69,10 +69,12 @@ context('/src/Nodes/OrderedList/Vue/', () => { }) it('should leave the list with double enter', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('1. List Item 1{enter}{enter}Paragraph') + .type('1. List Item 1{enter}{enter}Paragraph') cy.get('.tiptap') .find('li') @@ -85,10 +87,12 @@ context('/src/Nodes/OrderedList/Vue/', () => { }) it('should make a ordered list from a number', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('1. List Item 1{enter}List Item 2') + .type('1. List Item 1{enter}List Item 2') cy.get('.tiptap') .find('li:nth-child(1)') @@ -100,20 +104,24 @@ context('/src/Nodes/OrderedList/Vue/', () => { }) it('should make a ordered list from a number other than number one', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('2. List Item 1{enter}List Item 2') + .type('2. List Item 1{enter}List Item 2') cy.get('.tiptap').find('li:nth-child(1)').should('contain', 'List Item 1') cy.get('.tiptap').find('li:nth-child(2)').should('contain', 'List Item 2') }) it('should remove the ordered list after pressing backspace', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('1. {backspace}Example') + .type('1. {backspace}Example') cy.get('.tiptap') .find('p') diff --git a/demos/src/Nodes/Paragraph/React/index.spec.js b/demos/src/Nodes/Paragraph/React/index.spec.js index 405530b0f0f..7cd66381269 100644 --- a/demos/src/Nodes/Paragraph/React/index.spec.js +++ b/demos/src/Nodes/Paragraph/React/index.spec.js @@ -4,7 +4,9 @@ context('/src/Nodes/Paragraph/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should parse paragraphs correctly', () => { diff --git a/demos/src/Nodes/Paragraph/Vue/index.spec.js b/demos/src/Nodes/Paragraph/Vue/index.spec.js index d2436f38274..bd1af92651b 100644 --- a/demos/src/Nodes/Paragraph/Vue/index.spec.js +++ b/demos/src/Nodes/Paragraph/Vue/index.spec.js @@ -4,7 +4,9 @@ context('/src/Nodes/Paragraph/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('should parse paragraphs correctly', () => { diff --git a/demos/src/Nodes/Table/React/index.spec.js b/demos/src/Nodes/Table/React/index.spec.js index 0050e73d0e2..0b423b97502 100644 --- a/demos/src/Nodes/Table/React/index.spec.js +++ b/demos/src/Nodes/Table/React/index.spec.js @@ -4,7 +4,9 @@ context('/src/Nodes/Table/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('creates a table (1x1)', () => { diff --git a/demos/src/Nodes/Table/Vue/index.spec.js b/demos/src/Nodes/Table/Vue/index.spec.js index e3ef61aea96..cdfd5e9c258 100644 --- a/demos/src/Nodes/Table/Vue/index.spec.js +++ b/demos/src/Nodes/Table/Vue/index.spec.js @@ -4,7 +4,9 @@ context('/src/Nodes/Table/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('creates a table (1x1)', () => { diff --git a/demos/src/Nodes/TaskList/React/index.spec.js b/demos/src/Nodes/TaskList/React/index.spec.js index 807f8171cd2..72772aba3eb 100644 --- a/demos/src/Nodes/TaskList/React/index.spec.js +++ b/demos/src/Nodes/TaskList/React/index.spec.js @@ -64,9 +64,11 @@ context('/src/Nodes/TaskList/React/', () => { }) it('should leave the list with double enter', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('[ ] List Item 1{enter}{enter}Paragraph') + cy.get('.tiptap').type('[ ] List Item 1{enter}{enter}Paragraph') cy.get('.tiptap').find('li').its('length').should('eq', 1) @@ -74,9 +76,11 @@ context('/src/Nodes/TaskList/React/', () => { }) it('should make a task list from square brackets', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('[ ] List Item 1{enter}List Item 2') + cy.get('.tiptap').type('[ ] List Item 1{enter}List Item 2') cy.get('.tiptap') .find('li:nth-child(1)') @@ -90,9 +94,11 @@ context('/src/Nodes/TaskList/React/', () => { }) it('should make a task list from checked square brackets', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) - cy.get('.tiptap').realType('[x] List Item 1{enter}List Item 2') + cy.get('.tiptap').type('[x] List Item 1{enter}List Item 2') cy.get('.tiptap') .find('li:nth-child(1)') diff --git a/demos/src/Nodes/TaskList/Vue/index.spec.js b/demos/src/Nodes/TaskList/Vue/index.spec.js index 6df373b55d4..471efc228b0 100644 --- a/demos/src/Nodes/TaskList/Vue/index.spec.js +++ b/demos/src/Nodes/TaskList/Vue/index.spec.js @@ -69,10 +69,12 @@ context('/src/Nodes/TaskList/Vue/', () => { }) it('should leave the list with double enter', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('[ ] List Item 1{enter}{enter}Paragraph') + .type('[ ] List Item 1{enter}{enter}Paragraph') cy.get('.tiptap') .find('li') @@ -85,10 +87,12 @@ context('/src/Nodes/TaskList/Vue/', () => { }) it('should make a task list from square brackets', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('[ ] List Item 1{enter}List Item 2') + .type('[ ] List Item 1{enter}List Item 2') cy.get('.tiptap') .find('li:nth-child(1)') @@ -102,10 +106,12 @@ context('/src/Nodes/TaskList/Vue/', () => { }) it('should make a task list from checked square brackets', () => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) cy.get('.tiptap') - .realType('[x] List Item 1{enter}List Item 2') + .type('[x] List Item 1{enter}List Item 2') cy.get('.tiptap') .find('li:nth-child(1)') diff --git a/demos/src/Nodes/Text/React/index.spec.js b/demos/src/Nodes/Text/React/index.spec.js index a965b983f4e..95de137aee8 100644 --- a/demos/src/Nodes/Text/React/index.spec.js +++ b/demos/src/Nodes/Text/React/index.spec.js @@ -4,7 +4,9 @@ context('/src/Nodes/Text/React/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('text should be wrapped in a paragraph by default', () => { diff --git a/demos/src/Nodes/Text/Vue/index.spec.js b/demos/src/Nodes/Text/Vue/index.spec.js index e98c91eb993..a33836c51b4 100644 --- a/demos/src/Nodes/Text/Vue/index.spec.js +++ b/demos/src/Nodes/Text/Vue/index.spec.js @@ -4,7 +4,9 @@ context('/src/Nodes/Text/Vue/', () => { }) beforeEach(() => { - cy.resetEditor() + cy.get('.tiptap').then(([{ editor }]) => { + editor.commands.clearContent() + }) }) it('text should be wrapped in a paragraph by default', () => { diff --git a/package-lock.json b/package-lock.json index 7124ed8f01b..60fb3d770ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,6 @@ "@typescript-eslint/parser": "^5.62.0", "babel-loader": "^9.1.3", "cypress": "^10.11.0", - "cypress-real-events": "^1.13.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", @@ -7413,15 +7412,6 @@ "node": ">=12.0.0" } }, - "node_modules/cypress-real-events": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/cypress-real-events/-/cypress-real-events-1.13.0.tgz", - "integrity": "sha512-LoejtK+dyZ1jaT8wGT5oASTPfsNV8/ClRp99ruN60oPj8cBJYod80iJDyNwfPAu4GCxTXOhhAv9FO65Hpwt6Hg==", - "dev": true, - "peerDependencies": { - "cypress": "^4.x || ^5.x || ^6.x || ^7.x || ^8.x || ^9.x || ^10.x || ^11.x || ^12.x || ^13.x" - } - }, "node_modules/cypress/node_modules/@types/node": { "version": "14.18.63", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", @@ -18955,141 +18945,141 @@ }, "packages/core": { "name": "@tiptap/core", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-blockquote": { "name": "@tiptap/extension-blockquote", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-bold": { "name": "@tiptap/extension-bold", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-bubble-menu": { "name": "@tiptap/extension-bubble-menu", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "dependencies": { "tippy.js": "^6.3.7" }, "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-bullet-list": { "name": "@tiptap/extension-bullet-list", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-character-count": { "name": "@tiptap/extension-character-count", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-code": { "name": "@tiptap/extension-code", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-code-block": { "name": "@tiptap/extension-code-block", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-code-block-lowlight": { "name": "@tiptap/extension-code-block-lowlight", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/extension-code-block": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/extension-code-block": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "lowlight": "^2 || ^3" }, "funding": { @@ -19097,20 +19087,20 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/extension-code-block": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/extension-code-block": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "highlight.js": "^11", "lowlight": "^2 || ^3" } }, "packages/extension-collaboration": { "name": "@tiptap/extension-collaboration", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "y-prosemirror": "^1.2.12" }, "funding": { @@ -19118,17 +19108,17 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "y-prosemirror": "^1.2.11" } }, "packages/extension-collaboration-cursor": { "name": "@tiptap/extension-collaboration-cursor", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", "y-prosemirror": "^1.2.12" }, "funding": { @@ -19136,7 +19126,7 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", "y-prosemirror": "^1.2.11" } }, @@ -19192,601 +19182,601 @@ }, "packages/extension-color": { "name": "@tiptap/extension-color", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/extension-text-style": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/extension-text-style": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/extension-text-style": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/extension-text-style": "^2.7.0-pre.0" } }, "packages/extension-document": { "name": "@tiptap/extension-document", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-dropcursor": { "name": "@tiptap/extension-dropcursor", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-floating-menu": { "name": "@tiptap/extension-floating-menu", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "dependencies": { "tippy.js": "^6.3.7" }, "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-focus": { "name": "@tiptap/extension-focus", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-font-family": { "name": "@tiptap/extension-font-family", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/extension-text-style": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/extension-text-style": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/extension-text-style": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/extension-text-style": "^2.7.0-pre.0" } }, "packages/extension-gapcursor": { "name": "@tiptap/extension-gapcursor", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-hard-break": { "name": "@tiptap/extension-hard-break", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-heading": { "name": "@tiptap/extension-heading", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-highlight": { "name": "@tiptap/extension-highlight", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-history": { "name": "@tiptap/extension-history", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-horizontal-rule": { "name": "@tiptap/extension-horizontal-rule", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-image": { "name": "@tiptap/extension-image", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-italic": { "name": "@tiptap/extension-italic", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-link": { "name": "@tiptap/extension-link", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "dependencies": { "linkifyjs": "^4.1.0" }, "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-list-item": { "name": "@tiptap/extension-list-item", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-list-keymap": { "name": "@tiptap/extension-list-keymap", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-mention": { "name": "@tiptap/extension-mention", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", - "@tiptap/suggestion": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", + "@tiptap/suggestion": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", - "@tiptap/suggestion": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", + "@tiptap/suggestion": "^2.7.0-pre.0" } }, "packages/extension-ordered-list": { "name": "@tiptap/extension-ordered-list", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-paragraph": { "name": "@tiptap/extension-paragraph", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-placeholder": { "name": "@tiptap/extension-placeholder", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-strike": { "name": "@tiptap/extension-strike", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-subscript": { "name": "@tiptap/extension-subscript", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-superscript": { "name": "@tiptap/extension-superscript", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-table": { "name": "@tiptap/extension-table", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-table-cell": { "name": "@tiptap/extension-table-cell", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-table-header": { "name": "@tiptap/extension-table-header", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-table-row": { "name": "@tiptap/extension-table-row", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-task-item": { "name": "@tiptap/extension-task-item", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/extension-task-list": { "name": "@tiptap/extension-task-list", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-text": { "name": "@tiptap/extension-text", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-text-align": { "name": "@tiptap/extension-text-align", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-text-style": { "name": "@tiptap/extension-text-style", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-typography": { "name": "@tiptap/extension-typography", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-underline": { "name": "@tiptap/extension-underline", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/extension-youtube": { "name": "@tiptap/extension-youtube", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0" } }, "packages/html": { "name": "@tiptap/html", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "dependencies": { "zeed-dom": "^0.10.11" }, "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/pm": { "name": "@tiptap/pm", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "dependencies": { "prosemirror-changeset": "^2.2.1", @@ -19815,18 +19805,18 @@ }, "packages/react": { "name": "@tiptap/react", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "dependencies": { - "@tiptap/extension-bubble-menu": "^3.0.0-pre.0", - "@tiptap/extension-floating-menu": "^3.0.0-pre.0", + "@tiptap/extension-bubble-menu": "^2.7.0-pre.0", + "@tiptap/extension-floating-menu": "^2.7.0-pre.0", "@types/use-sync-external-store": "^0.0.6", "fast-deep-equal": "^3", "use-sync-external-store": "^1.2.2" }, "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", "react": "^18.0.0", @@ -19837,37 +19827,37 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0" } }, "packages/starter-kit": { "name": "@tiptap/starter-kit", - "version": "3.0.0-pre.0", - "license": "MIT", - "dependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/extension-blockquote": "^3.0.0-pre.0", - "@tiptap/extension-bold": "^3.0.0-pre.0", - "@tiptap/extension-bullet-list": "^3.0.0-pre.0", - "@tiptap/extension-code": "^3.0.0-pre.0", - "@tiptap/extension-code-block": "^3.0.0-pre.0", - "@tiptap/extension-document": "^3.0.0-pre.0", - "@tiptap/extension-dropcursor": "^3.0.0-pre.0", - "@tiptap/extension-gapcursor": "^3.0.0-pre.0", - "@tiptap/extension-hard-break": "^3.0.0-pre.0", - "@tiptap/extension-heading": "^3.0.0-pre.0", - "@tiptap/extension-history": "^3.0.0-pre.0", - "@tiptap/extension-horizontal-rule": "^3.0.0-pre.0", - "@tiptap/extension-italic": "^3.0.0-pre.0", - "@tiptap/extension-list-item": "^3.0.0-pre.0", - "@tiptap/extension-ordered-list": "^3.0.0-pre.0", - "@tiptap/extension-paragraph": "^3.0.0-pre.0", - "@tiptap/extension-strike": "^3.0.0-pre.0", - "@tiptap/extension-text": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "version": "2.7.0-pre.0", + "license": "MIT", + "dependencies": { + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/extension-blockquote": "^2.7.0-pre.0", + "@tiptap/extension-bold": "^2.7.0-pre.0", + "@tiptap/extension-bullet-list": "^2.7.0-pre.0", + "@tiptap/extension-code": "^2.7.0-pre.0", + "@tiptap/extension-code-block": "^2.7.0-pre.0", + "@tiptap/extension-document": "^2.7.0-pre.0", + "@tiptap/extension-dropcursor": "^2.7.0-pre.0", + "@tiptap/extension-gapcursor": "^2.7.0-pre.0", + "@tiptap/extension-hard-break": "^2.7.0-pre.0", + "@tiptap/extension-heading": "^2.7.0-pre.0", + "@tiptap/extension-history": "^2.7.0-pre.0", + "@tiptap/extension-horizontal-rule": "^2.7.0-pre.0", + "@tiptap/extension-italic": "^2.7.0-pre.0", + "@tiptap/extension-list-item": "^2.7.0-pre.0", + "@tiptap/extension-ordered-list": "^2.7.0-pre.0", + "@tiptap/extension-paragraph": "^2.7.0-pre.0", + "@tiptap/extension-strike": "^2.7.0-pre.0", + "@tiptap/extension-text": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", @@ -19876,33 +19866,33 @@ }, "packages/suggestion": { "name": "@tiptap/suggestion", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0" + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0" } }, "packages/vue-2": { "name": "@tiptap/vue-2", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "dependencies": { - "@tiptap/extension-bubble-menu": "^3.0.0-pre.0", - "@tiptap/extension-floating-menu": "^3.0.0-pre.0", + "@tiptap/extension-bubble-menu": "^2.7.0-pre.0", + "@tiptap/extension-floating-menu": "^2.7.0-pre.0", "vue-ts-types": "^1.6.0" }, "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "vue": "^2.6.0" }, "funding": { @@ -19910,8 +19900,8 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "vue": "^2.6.0" } }, @@ -19953,15 +19943,15 @@ }, "packages/vue-3": { "name": "@tiptap/vue-3", - "version": "3.0.0-pre.0", + "version": "2.7.0-pre.0", "license": "MIT", "dependencies": { - "@tiptap/extension-bubble-menu": "^3.0.0-pre.0", - "@tiptap/extension-floating-menu": "^3.0.0-pre.0" + "@tiptap/extension-bubble-menu": "^2.7.0-pre.0", + "@tiptap/extension-floating-menu": "^2.7.0-pre.0" }, "devDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "vue": "^3.0.0" }, "funding": { @@ -19969,8 +19959,8 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.0.0-pre.0", - "@tiptap/pm": "^3.0.0-pre.0", + "@tiptap/core": "^2.7.0-pre.0", + "@tiptap/pm": "^2.7.0-pre.0", "vue": "^3.0.0" } }, diff --git a/package.json b/package.json index db2d3644706..4dddac6b771 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ "@typescript-eslint/parser": "^5.62.0", "babel-loader": "^9.1.3", "cypress": "^10.11.0", - "cypress-real-events": "^1.13.0", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.57.0", "eslint-config-airbnb-base": "^15.0.0", diff --git a/packages/core/src/InputRule.ts b/packages/core/src/InputRule.ts index 463be443173..1b56dccfc7b 100644 --- a/packages/core/src/InputRule.ts +++ b/packages/core/src/InputRule.ts @@ -216,6 +216,17 @@ export function inputRulesPlugin(props: { editor: Editor; rules: InputRule[] }): }, props: { + handleTextInput(view, from, to, text) { + return run({ + editor, + from, + to, + text, + rules, + plugin, + }) + }, + handleDOMEvents: { compositionend: view => { setTimeout(() => { @@ -235,20 +246,6 @@ export function inputRulesPlugin(props: { editor: Editor; rules: InputRule[] }): return false }, - - keyup(view, event) { - if (event.key.length === 1) { - return run({ - editor, - from: view.state.selection.from, - to: view.state.selection.from, - text: '', - rules, - plugin, - }) - } - return false - }, }, // add support for input rules to trigger on enter diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index 7a54ade42d7..c116e23426e 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -1,5 +1,3 @@ -import 'cypress-real-events' - // *********************************************** // This example commands.js shows you how to // create various custom commands and overwrite @@ -97,11 +95,3 @@ Cypress.Commands.add( return subject }, ) - -Cypress.Commands.add('resetEditor', () => { - cy - .get('.tiptap').then(([{ editor }]) => { - editor.commands.clearContent() - }) - .click() -})