Commit Graph

586 Commits

Author SHA1 Message Date
bdbch
e3c5c7cf6f add support for react 19 ref props (#6405) (#6412)
* add support for react 19 ref props (#6405)

* add support for react 19 ref props

* added changeset

* Update packages/react/src/ReactRenderer.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* use partial imports instead of importing the whole React library

* fix react renderer not passing ref prop

* upgrade dev dependencies for react

* updated lockfile

* upgrade dev dependencies

* update package.json

* remove optionalDependencies and move react deps to peerDependencies

* enhance ReactRenderer for React 19 compatibility and improve ref handling

* remove unused 'node' property from ReactNodeViewProps type definition

* fix: update ref type in ReactNodeView to be generic

* fix: replace FunctionComponent with NamedExoticComponent for better performance in ReactNodeView

* cloned react renderer element props to avoid side effects

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: update ReactNodeViewProps to allow null ref values (#6415)

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-05 08:47:50 +02:00
Arnau Gómez Farell
783ff1ab58
fix: modify test body to reflect the test description 2025-05-05 12:14:58 +02:00
Arnau Gómez Farell
b0136eca8c
fix: failing test 2025-05-05 12:14:03 +02:00
Arnau Gómez Farell
fb4a16b61d
fix: failed test run 2025-05-05 12:06:36 +02:00
zzxming
ab7a2ae73c feat(text-align): add toggle command (#6101)
* feat(text-align): add toggle command

* docs: changeset

* Update .changeset/spotty-cobras-shake.md

---------

Co-authored-by: bdbch <6538827+bdbch@users.noreply.github.com>
2025-04-30 03:09:31 +02:00
dependabot[bot]
38ebfdae12 build(deps-dev): bump vite from 5.4.15 to 5.4.17 (#6240)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.15 to 5.4.17.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.17/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.17/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.17
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-30 03:06:08 +02:00
teamclouday
81009d2160
Add option to set rel on youtube embed link (#6083)
* add option to set rel on youtube embed link

* rename parameter and add changeset

* change to patch

* fix lint and try to fix for tests

---------

Co-authored-by: bdbch <6538827+bdbch@users.noreply.github.com>
2025-03-27 23:32:02 +01:00
dependabot[bot]
c403b90887
build(deps-dev): bump esbuild from 0.21.5 to 0.25.0 (#6095)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.21.5 to 0.25.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bdbch <6538827+bdbch@users.noreply.github.com>
2025-03-27 23:14:51 +01:00
dependabot[bot]
5de7318cf5
build(deps-dev): bump vite from 5.4.11 to 5.4.15 (#6208)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.11 to 5.4.15.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.15/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.15/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 23:07:44 +01:00
github-actions[bot]
68bb0b4be2 chore(release): publish a new release version (#6075)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-31 10:52:49 +01:00
Nick Perez
839eb476e0
docs: add a custom shortcuts example (#5981)
Some checks failed
build / lint (20) (push) Has been cancelled
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Has been cancelled
Publish / Release (20) (push) Has been cancelled
build / build (20) (push) Has been cancelled
2025-01-14 08:33:11 +01:00
Nick the Sick
44cae5badc
chore: update eslint
Some checks are pending
build / lint (20) (push) Waiting to run
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Waiting to run
build / build (20) (push) Blocked by required conditions
Publish / Release (20) (push) Waiting to run
2024-12-31 11:14:13 +01:00
Nick the Sick
c791254f40
Merge branch 'main' into develop 2024-12-30 16:53:34 +01:00
bdbch
1c2fefe3d6
Fixed Link extension's commands not respecting XSS prevention via unallowed protocols (#5945)
* fixed link commands not respecting allowed protocols

* added changesets

* refactor(link): don't use throw for invalid uri handling
2024-12-19 12:16:03 +01:00
Ayu Nakata
a0d2f28036
feat(text-style): add mergeNestedSpanStyles option to merge nested spans #5720 (#5897)
Some checks failed
build / lint (20) (push) Has been cancelled
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Has been cancelled
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Has been cancelled
Publish / Release (20) (push) Has been cancelled
build / build (20) (push) Has been cancelled
2024-12-03 16:49:26 +01:00
bdbch
ce914528d3
Force add text align styles when a defaultAlignment is set (#5891)
Some checks are pending
build / lint (20) (push) Waiting to run
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Waiting to run
build / build (20) (push) Blocked by required conditions
Publish / Release (20) (push) Waiting to run
* fix: make TextAlign defaultAlignment setting work as expected

* allow defaultAlignment to be nullable, dont add text align if defaultAlignment is null

* added changeset

* remove default alignment from demo

* refactor text-align logic

* adjust tests to expect the new behavior

* adjust vue tests to expect the new behavior

---------

Co-authored-by: Joe <joe@Joes-MBP.lan>
2024-12-02 10:54:06 +01:00
Dominik Biedebach
425332eea9 remove issue demo 2024-11-30 14:23:41 +01:00
bdbch
d9b6ef5ce2
fix emptyTextBlock detection to handle leaf nodes too (#5838)
* fix: #4327

* merge forked PR

---------

Co-authored-by: Tony Hallett <tonyhallett74@gmail.com>
2024-11-30 14:19:16 +01:00
bdbch
ca6269e928
feat: allow support for drag-and-drop between multiple editors (#5893)
* feat: drag and drop across multi editors

* feat: drag and drop across multi editors optimize

* feat: drag and drop across multi editors optimize

* added changeset

---------

Co-authored-by: songhandong <songhandong@baidu.com>
Co-authored-by: songispm <38745323+songispm@users.noreply.github.com>
Co-authored-by: songispm <songispm@gmail.com>
2024-11-30 13:16:45 +01:00
Alex Casillas
f49ef7cabb
fix: remove unused spec for font family extension (#5886)
Some checks are pending
build / lint (20) (push) Waiting to run
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Waiting to run
build / build (20) (push) Blocked by required conditions
Publish / Release (20) (push) Waiting to run
* fix: add new spec to check for multiple font families and fix the demo

---------

Co-authored-by: Alex Casillas <alexvcasilas@gmail.com>
2024-11-28 11:23:33 +01:00
Alex Casillas
a8c8db60b6
fix: font family extesion demo (#5880)
Some checks are pending
build / lint (20) (push) Waiting to run
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Waiting to run
build / build (20) (push) Blocked by required conditions
Publish / Release (20) (push) Waiting to run
Co-authored-by: Alex Casillas <alexvcasilas@gmail.com>
2024-11-27 17:22:45 +01:00
github-actions[bot]
4b2de3394a
chore(release): release version 2.10.0 (#5843)
Some checks are pending
build / lint (20) (push) Waiting to run
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Waiting to run
build / build (20) (push) Blocked by required conditions
Publish / Release (20) (push) Waiting to run
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-20 11:05:37 +01:00
Nick Perez
5eee48093b
fix(react): improve React 19 compatibility by using JSX transform instead #5846 (#5848) 2024-11-20 10:46:29 +01:00
Nick the Sick
76192158e0
revert: "chore(release): publish a new pre-release version (#5769)"
Some checks are pending
build / lint (20) (push) Waiting to run
build / test (20, map[name:Demos/Examples spec:./demos/src/Examples/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Experiments spec:./demos/src/Experiments/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Extensions spec:./demos/src/Extensions/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideContent spec:./demos/src/GuideContent/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/GuideGettingStarted spec:./demos/src/GuideGettingStarted/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Marks spec:./demos/src/Marks/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Demos/Nodes spec:./demos/src/Nodes/**/*.spec.{js,ts}]) (push) Waiting to run
build / test (20, map[name:Integration spec:./tests/cypress/integration/**/*.spec.{js,ts}]) (push) Waiting to run
build / build (20) (push) Blocked by required conditions
Publish / Release (20) (push) Waiting to run
This reverts commit 177868a286.
2024-11-17 15:02:34 +01:00
SanderLeenders
38abfdf9ea
fix(font-family): Prevent removal of quotes in parseHTML (#5828)
Removed the quote removal step in font-family parsing to support fonts that contain both spaces and numbers, such as "Exo 2", which require quotes for proper recognition.

---------

Co-authored-by: Sander <sander@blueberry.nl>
Co-authored-by: Nick Perez <nicholas.perez@tiptap.dev>
2024-11-17 14:56:26 +01:00
github-actions[bot]
177868a286
chore(release): publish a new pre-release version (#5769)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-17 14:55:22 +01:00
Nick Perez
62c6dddf80
fix(link): add backwards compat by deprecating validate and using isAllowedUri instead (#5812) 2024-11-07 13:18:01 +01:00
Éric Le Maître
94a8d258f8
fix(vue-3): on editor destruction, transition smoothly (#5772) 2024-11-07 09:19:46 +01:00
Armando Guarino
585f6ef77e test: improve url parsing logic 2024-11-06 15:08:30 +01:00
Armando Guarino
035862b698 refactor: update tests url checking logic and comments 2024-11-06 14:11:48 +01:00
Armando Guarino
444e6e5a11 refactor: adjust validate and add shouldAutoLink to improve URL handling 2024-11-06 13:43:54 +01:00
Héctor Chong
077c540cf9
docs: add drag handle demo for React (#5783) 2024-10-30 10:44:45 +01:00
Rägnar O'ock
152390130e
fix(table): set min-width for cols #5435 (#5464) 2024-10-30 10:31:25 +01:00
Armando Guarino
6b2df67219
fix: add zero-width space to resolve cursor selection issue (#5774) 2024-10-28 14:19:25 +01:00
Nick Perez
f95b13e93f
feat(core): allow nodes and fragments to be inserted into the editor using insertContentAt command #5764 (#5766) 2024-10-25 16:32:18 +02:00
Nick the Sick
f89a6d9f55
Merge branch 'main' into develop 2024-10-22 15:10:41 +02:00
Nick Perez
873a67c6e3
feat: in a collab setting, disable transactions that are trying to sync invalid content (#5207)
When collaborating on a document, a client may send changes which are invalid to the current client. This change makes it so that the client can be disabled from synchronizing any further changes to avoid the default behavior of stripping unknown content. This would allow the other client to continue editing on the document while still synchronizing any known changes.
2024-10-21 17:15:06 +02:00
Nick Perez
ffb51d3b7e
fix(core): respect the editor's parseOptions (#5742)
Co-authored-by: guarmo <armando.guarino@tiptap.dev>
2024-10-21 12:55:35 +02:00
trry
7ddc1af5e9
chore: delete duplicate name (#5732) 2024-10-20 22:33:20 +02:00
Nick the Sick
bfcf6d94e8
test: use id for tests 2024-10-18 16:36:11 +02:00
Éric Le Maître
364231a1bd
Fix editor destruction at the end of Vue transition (#5648)
* wip: destruction éditeur

* fix: replacing DOM nodes at unmount

* fix: event for useEditor destroy

* chore: Generating changeset

* chore: generating changeset

* chore: delete duplicate changeset

* revert: note tutorial

* feat: add Vue transition example

* fix: test for Vue transition

* fix: components within editor

* chore: remove useless ref
2024-10-14 10:26:12 +02:00
Jaap van Hoek
21df331b60
fix(table): respect resizeable columns colwidths (#4955) 2024-10-04 14:17:08 +02:00
github-actions[bot]
5d9b8d0907
chore(release): release version 2.8.0 (#5669) 2024-09-30 16:46:03 +02:00
Nick Perez
6834a7f7d6
build: type defs only emit for a single package's code (#5665) 2024-09-26 14:51:00 +02:00
dependabot[bot]
1bad8f8c95
build(deps-dev): bump vite from 5.4.1 to 5.4.6 (#5629)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.1 to 5.4.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-25 14:07:59 +02:00
Sven Adlung
cbe06d12db
fix(vue-3): late-registering plugins #5259 (#5616) 2024-09-18 14:46:45 +02:00
dependabot[bot]
cf443630cf
build(deps-dev): bump svelte from 4.2.18 to 4.2.19 (#5571)
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.2.18 to 4.2.19.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/svelte@4.2.19/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.19/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 15:52:41 +02:00
Nick the Sick
e0c4db9674
revert: "fix(core): handle macOS text expansion properly in InputRules (#5261)"
This reverts commit 88e310b144.
2024-09-16 06:19:37 +02:00
Ricardo Amaral
88e310b144
fix(core): handle macOS text expansion properly in InputRules (#5261) 2024-08-22 12:34:27 +02:00
Nick Perez
07fa49d026
fix: preserve attributes of toggled node #3644 (#5489)
I only feel comfortable copying the attributes of the current node if the selection is only within a single node (I don't know what is expected if you had a selection of multiple nodes, the intersection of the attributes maybe?)

---------

Co-authored-by: Dominik Biedebach <dominik.biedebach@tiptap.dev>
2024-08-21 14:03:57 +02:00