* 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>
* 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>
* 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>
* 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>
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>
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.
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>
The core of the change ended up being quite simple, because we can create the editor within the first render, we need to already schedule it's destruction.
Scheduling a destruction, ensures that an instance that was created in that first render pass can be cleaned up.
Waiting one more tick than before ensures that we don't accidentally destroy an editor instance that could actually be valid in the next render pass.
In StrictMode, there will be two editor instances created, the first will be created & quickly destroyed in 2 ticks.
In Normal React, there will only ever be 1 instance created and destroyed only on unmount.
Vue internally uses prototype chain to preserve injects across the entire component chain. Thus should avoid Object.assign or spread operator as it won't copy the prototype. All correct provides will be already present on `instance.provides`.
This forces the editor to re-use the editor instance that existed prior to an unmount and remount of the same component.
This fixes a bug in `React.StrictMode` introduced with the latest performance updates by PR #5161
* fix: default to rendering the editor immediately, while staying backward compatible
* feat: add `useEditorWithState` hook for extracting state and editor instance simultaneously
* feat(react): add `useEditorState` hook for subscribing to selected editor state
* docs: add an example to show the concept
* chore: add changeset