Skip to content

Commit

Permalink
sync with main
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbch committed Jan 8, 2024
2 parents af72bd1 + 6c7b27f commit 8c99685
Show file tree
Hide file tree
Showing 66 changed files with 1,399 additions and 15,618 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.1.14](https://github.com/ueberdosis/tiptap/compare/v2.1.13...v2.1.14) (2024-01-08)


### Bug Fixes

* **typography:** require spaces after divisions to not break date formats ([#4696](https://github.com/ueberdosis/tiptap/issues/4696)) ([f6d7e00](https://github.com/ueberdosis/tiptap/commit/f6d7e00a746a67fa440a3fa0f5362295959873d2))





## [2.1.13](https://github.com/ueberdosis/tiptap/compare/v2.1.12...v2.1.13) (2023-11-30)

### Bug Fixes
Expand Down
11 changes: 11 additions & 0 deletions demos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.1.14](https://github.com/ueberdosis/tiptap/compare/v2.1.13...v2.1.14) (2024-01-08)


### Bug Fixes

* **typography:** require spaces after divisions to not break date formats ([#4696](https://github.com/ueberdosis/tiptap/issues/4696)) ([f6d7e00](https://github.com/ueberdosis/tiptap/commit/f6d7e00a746a67fa440a3fa0f5362295959873d2))





## [2.1.13](https://github.com/ueberdosis/tiptap/compare/v2.1.12...v2.1.13) (2023-11-30)

**Note:** Version bump only for package tiptap-demos
Expand Down
2 changes: 1 addition & 1 deletion demos/src/Examples/Savvy/React/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ context('/src/Examples/Savvy/React/', () => {

tests.forEach(test => {
it(`should parse ${test[0]} correctly`, () => {
cy.get('.tiptap').type(test[0]).should('contain', test[1])
cy.get('.tiptap').type(`${test[0]} `).should('contain', test[1])
})
})

Expand Down
2 changes: 1 addition & 1 deletion demos/src/Examples/Savvy/Vue/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ context('/src/Examples/Savvy/Vue/', () => {
tests.forEach(test => {
it(`should parse ${test[0]} correctly`, () => {
cy.get('.tiptap')
.type(test[0])
.type(`${test[0]} `)
.should('contain', test[1])
})
})
Expand Down
3 changes: 2 additions & 1 deletion demos/src/Marks/Link/React/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default () => {
Code,
Bold,
Link.configure({
openOnClick: true,
openOnClick: false,
autolink: true,
}),
],
content: `
Expand Down
24 changes: 10 additions & 14 deletions demos/src/Marks/Link/React/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Link from '@tiptap/extension-link'

context('/src/Marks/Link/React/', () => {
before(() => {
cy.visit('/src/Marks/Link/React/')
Expand All @@ -12,18 +10,6 @@ context('/src/Marks/Link/React/', () => {
})
})

it('should add a custom class to a link', () => {
const linkExtension = Link.configure({
HTMLAttributes: {
class: 'foo',
},
})

expect(linkExtension.options.HTMLAttributes).to.deep.include({
class: 'foo',
})
})

it('should parse a tags correctly', () => {
cy.get('.tiptap').then(([{ editor }]) => {
editor.commands.setContent('<p><a href="#">Example Text1</a></p>')
Expand Down Expand Up @@ -66,6 +52,16 @@ context('/src/Marks/Link/React/', () => {
})
})

it('detects autolinking', () => {
cy.get('.tiptap').type('https://example.com ').find('a').should('contain', 'https://example.com')
.should('have.attr', 'href', 'https://example.com')
})

it('detects autolinking with numbers', () => {
cy.get('.tiptap').type('https://tiptap4u.com ').find('a').should('contain', 'https://tiptap4u.com')
.should('have.attr', 'href', 'https://tiptap4u.com')
})

it('detects a pasted URL within a text', () => {
cy.get('.tiptap')
.paste({
Expand Down
10 changes: 10 additions & 0 deletions demos/src/Marks/Link/Vue/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ context('/src/Marks/Link/Vue/', () => {
.should('have.attr', 'href', 'https://example2.com')
})

it('detects autolinking', () => {
cy.get('.tiptap').type('https://example.com ').find('a').should('contain', 'https://example.com')
.should('have.attr', 'href', 'https://example.com')
})

it('detects autolinking with numbers', () => {
cy.get('.tiptap').type('https://tiptap4u.com ').find('a').should('contain', 'https://tiptap4u.com')
.should('have.attr', 'href', 'https://tiptap4u.com')
})

it('detects a pasted URL with query params', () => {
cy.get('.tiptap')
.paste({ pastePayload: 'https://example.com?paramA=nice&paramB=cool', pasteType: 'text/plain' })
Expand Down
Loading

0 comments on commit 8c99685

Please sign in to comment.