Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiptap 2.7 #5560

Merged
merged 29 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bd34793
fix: update pm versions (#5488)
nperez0111 Aug 16, 2024
5333119
chore: rebuild pjson (#5513)
nperez0111 Aug 17, 2024
c99627d
refactor(react): default to using deep equal comparisons (#5512)
nperez0111 Aug 17, 2024
4ff2a4e
feat(react): allow attrs to be a callback
YaoKaiLun Aug 18, 2024
04bf24a
chore: minor docs & renaming
nperez0111 Aug 20, 2024
7f24a66
refactor(core): update typings for NodeViews to be accurate to implem…
nperez0111 Aug 20, 2024
cac2da1
chore: reorder types declarations
nperez0111 Aug 20, 2024
97ea55f
fix(core): read `preventClearDocument` meta + allow disable core plug…
AlansCodeLog Aug 20, 2024
dbcdaad
fix(task-item): prevent onBlur being trigged when toggled (#5520)
jarlef Aug 20, 2024
c076a0e
fix: make type partial (#5514)
nperez0111 Aug 21, 2024
8a55cdd
fix(suggestion): sometimes a suggestion would not show up (#4380) (#5…
nperez0111 Aug 21, 2024
dcffe44
Merge branch 'main' into develop
nperez0111 Aug 21, 2024
07fa49d
fix: preserve attributes of toggled node #3644 (#5489)
nperez0111 Aug 21, 2024
da8fcf3
Use parent window for cross-frame instantiation (#5534)
bdbch Aug 21, 2024
9e18d24
feature(core): add onPaste and onDrop events to editor (#4843)
bdbch Aug 21, 2024
a22767e
fix(core): styles de-duplicate in mergeAttributes (#4610)
sifat009 Aug 21, 2024
f805333
fix(core): check schema's nesting rules on contentCheck (#5500) (#5535)
lepult Aug 21, 2024
88e310b
fix(core): handle macOS text expansion properly in InputRules (#5261)
rfgamaral Aug 22, 2024
fafb5ad
feat: add data attribute on ReactNodeViewContent div (#5539)
WilliamIPark Aug 23, 2024
daad533
fix(suggestion): dropdown can now be closed with `Esc` (#4380) (#5544)
rfgamaral Aug 23, 2024
58e91c4
Merge branch 'main' into develop
nperez0111 Aug 23, 2024
9907eb3
fix(code-block-lowlight): support for lowlight v3 aliases (#5551)
Ilya-Iskra Aug 26, 2024
5d19e42
chore(release): release 2.7.0-pre.0
nperez0111 Aug 27, 2024
cf20679
build: don't bump major when you don't have to
nperez0111 Aug 27, 2024
e0c4db9
revert: "fix(core): handle macOS text expansion properly in InputRule…
nperez0111 Sep 16, 2024
2845b85
chore: ready for stable release
nperez0111 Sep 16, 2024
d347724
revert: "build: don't bump major when you don't have to"
nperez0111 Sep 16, 2024
4bfbc9b
revert: "revert: "build: don't bump major when you don't have to""
nperez0111 Sep 17, 2024
a170cf4
chore(release): release v2.7.0 (#5560)
nperez0111 Sep 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [
["@tiptap/*"]
],
"fixed": [["@tiptap/*"]],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
16 changes: 15 additions & 1 deletion demos/src/Extensions/TextAlign/React/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,21 @@ export default () => {
>
Justify
</button>
<button onClick={() => editor.chain().focus().unsetTextAlign().run()}>Unset text align</button>
<button onClick={() => editor.chain().focus().unsetTextAlign().run()}>
Unset text align
</button>
<button
onClick={() => editor.chain().focus().toggleHeading({ level: 1 }).run()}
className={editor.isActive({ level: 1 }) ? 'is-active' : ''}
>
Toggle H1
</button>
<button
onClick={() => editor.chain().focus().toggleHeading({ level: 2 }).run()}
className={editor.isActive({ level: 2 }) ? 'is-active' : ''}
>
Toggle H2
</button>
</div>
</div>
<EditorContent editor={editor} />
Expand Down
15 changes: 15 additions & 0 deletions demos/src/Extensions/TextAlign/React/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ context('/src/Extensions/TextAlign/React/', () => {
})
})

it('should keep the text aligned when toggling headings', () => {
const alignments = ['center', 'right', 'justify']
const headings = [1, 2]

cy.get('.tiptap').then(([{ editor }]) => {
alignments.forEach(alignment => {
headings.forEach(level => {
editor.commands.setContent(`<p style="text-align: ${alignment}">Example Text</p>`)
editor.commands.toggleHeading({ level })
expect(editor.getHTML()).to.eq(`<h${level} style="text-align: ${alignment}">Example Text</h${level}>`)
})
})
})
})

it('aligns the text left on the 1st button', () => {
cy.get('button:nth-child(1)').click()

Expand Down
15 changes: 15 additions & 0 deletions demos/src/Extensions/TextAlign/Vue/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ context('/src/Extensions/TextAlign/Vue/', () => {
})
})

it('should keep the text aligned when toggling headings', () => {
const alignments = ['center', 'right', 'justify']
const headings = [1, 2]

cy.get('.tiptap').then(([{ editor }]) => {
alignments.forEach(alignment => {
headings.forEach(level => {
editor.commands.setContent(`<p style="text-align: ${alignment}">Example Text</p>`)
editor.commands.toggleHeading({ level })
expect(editor.getHTML()).to.eq(`<h${level} style="text-align: ${alignment}">Example Text</h${level}>`)
})
})
})
})

it('aligns the text left on the 1st button', () => {
cy.get('button:nth-child(1)')
.click()
Expand Down
Loading