Merge branch 'main' of github.com:ueberdosis/tiptap

# Conflicts:
#	docs/api/extensions/unique-id.md
This commit is contained in:
Hans Pagel
2021-10-07 21:03:01 +02:00
45 changed files with 380 additions and 39 deletions

View File

@@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v2.3.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.4.0
uses: actions/setup-node@v2.4.1
with:
node-version: ${{ matrix.node-version }}
@@ -83,7 +83,7 @@ jobs:
- uses: actions/checkout@v2.3.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.4.0
uses: actions/setup-node@v2.4.1
with:
node-version: ${{ matrix.node-version }}
@@ -139,7 +139,7 @@ jobs:
- uses: actions/checkout@v2.3.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.4.0
uses: actions/setup-node@v2.4.1
with:
node-version: ${{ matrix.node-version }}

View File

@@ -1,4 +1,4 @@
# tiptap 2
# tiptap
A headless, framework-agnostic and extendable rich text editor, based on [ProseMirror](https://github.com/ProseMirror/prosemirror).
[![Build Status](https://github.com/ueberdosis/tiptap/workflows/build/badge.svg)](https://github.com/ueberdosis/tiptap/actions)
@@ -54,6 +54,12 @@ For help, discussion about best practices, or any other conversation that would
<strong>Gamma</strong>
</a>
</td>
<td align="center">
<a href="https://www.storyblok.com/">
<img src="https://unavatar.io/github/storyblok" width="100"><br>
<strong>Storyblok</strong>
</a>
</td>
</tr>
</table>

View File

@@ -23,7 +23,7 @@ There are also some extensions with more capabilities. We call them [nodes](/api
| [History](/api/extensions/history) | Included | [GitHub](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-history/) |
| [Placeholder](/api/extensions/placeholder) | | [GitHub](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-placeholder/) |
| [TextAlign](/api/extensions/text-align) | | [GitHub](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-text-align/) |
| [UniqueId](/api/extensions/unique-id) | | Requires a tiptap pro subscription |
| [UniqueID](/api/extensions/unique-id) | | Requires a tiptap pro subscription |
| [Typography](/api/extensions/typography) | | [GitHub](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-typography/) |
You dont have to use it, but we prepared a `@tiptap/starter-kit` which includes the most common extensions. Read more about [`StarterKit`](/guide/configuration#default-extensions).

View File

@@ -43,7 +43,7 @@ HardBreak.configure({
Add a line break.
```js
editor.commands.setHeardBreak()
editor.commands.setHardBreak()
```
## Keyboard shortcuts

View File

@@ -10,6 +10,7 @@ tiptap is framework-agnostic and even works with Vanilla JavaScript (if thats
## Integration guides
* [CDN](/installation/cdn)
* [React](/installation/react)
* [Next.js](/installation/nextjs)
* [Vue 3](/installation/vue3)
* [Vue 2](/installation/vue2)
* [Nuxt.js](/installation/nuxt)

View File

@@ -0,0 +1,75 @@
---
title: Next.js WYSIWYG
tableOfContents: true
---
# Next.js
## Introduction
The following guide describes how to integrate tiptap with your [Next.js](https://nextjs.org/) project.
## Requirements
* [Node](https://nodejs.org/en/download/) installed on your machine
* Experience with [React](https://reactjs.org/)
## 1. Create a project (optional)
If you already have an existing Next.js project, thats fine too. Just skip this step and proceed with the next step.
For the sake of this guide, lets start with a new Next.js project called `tiptap-example`. The following command sets up everything we need to get started.
```bash
# create a project
npx create-next-app tiptap-example
# change directory
cd tiptap-example
```
## 2. Install the dependencies
Now that we have a standard boilerplate set up we can get started on getting tiptap up and running! For this we will need to install two packages: `@tiptap/react` and `@tipta/starter-kit` which includes all the extensions you need to get started quickly.
```bash
# install with npm
npm install @tiptap/react @tiptap/starter-kit
# install with Yarn
yarn add @tiptap/react @tiptap/starter-kit
```
If you followed step 1 and 2, you can now start your project with `npm run dev` or `yarn dev`, and open [http://localhost:3000/](http://localhost:3000/) in your favorite browser. This might be different, if youre working with an existing project.
## 3. Create a new component
To actually start using tiptap, youll need to add a new component to your app. To do this, first create a directory called `components/`. Now it's time to create our component which we'll call `Tiptap`. To do this put the following example code in `components/Tiptap.js`.
```jsx
import { useEditor, EditorContent } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit'
const Tiptap = () => {
const editor = useEditor({
extensions: [
StarterKit,
],
content: '<p>Hello World! 🌎️</p>',
})
return (
<EditorContent editor={editor} />
)
}
export default Tiptap;
```
## 4. Add it to your app
Now, lets replace the content of `pages/index.js` with the following example code to use our new `Tiptap` component in our app.
```jsx
import Tiptap from '../components/Tiptap'
export default function Home() {
return (
<Tiptap />
)
}
```
You should now see tiptap in your browser. Time to give yourself a pat on the back! :)

View File

@@ -12,6 +12,14 @@ The following guide describes how to integrate tiptap with your [React](https://
* [Node](https://nodejs.org/en/download/) installed on your machine
* Experience with [React](https://reactjs.org/docs/getting-started.html)
## Using a template
If you just want to get up and running with tiptap you can use the [tiptap Create React App template](https://github.com/alb/cra-template-tiptap) by [@alb](https://github.com/alb) to automatically create a new project with all the steps below already completed.
```bash
# create a project based on the tiptap template
npx create-react-app tiptap-example --template tiptap
```
## 1. Create a project (optional)
If you already have an existing React project, thats fine too. Just skip this step and proceed with the next step.

View File

@@ -21,6 +21,9 @@
- title: React
link: /installation/react
skip: true
- title: Next.js
link: /installation/nextjs
skip: true
- title: Vue 3
link: /installation/vue3
skip: true
@@ -361,7 +364,7 @@
link: /api/extensions/text-align
- title: Typography
link: /api/extensions/typography
- title: UniqueId
- title: UniqueID
link: /api/extensions/unique-id
type: pro
- title: Utilities

View File

@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.118](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.117...@tiptap/core@2.0.0-beta.118) (2021-10-03)
### Bug Fixes
* fix order of executed plugins, fix [#1547](https://github.com/ueberdosis/tiptap/issues/1547) ([f8efdf7](https://github.com/ueberdosis/tiptap/commit/f8efdf797a10a01235b75091729b15aca076e47a))
# [2.0.0-beta.117](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.116...@tiptap/core@2.0.0-beta.117) (2021-10-02)
**Note:** Version bump only for package @tiptap/core
# [2.0.0-beta.116](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.115...@tiptap/core@2.0.0-beta.116) (2021-09-30)

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/core",
"description": "headless rich text editor",
"version": "2.0.0-beta.116",
"version": "2.0.0-beta.118",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -205,8 +205,12 @@ export default class ExtensionManager {
}
get plugins(): Plugin[] {
return [...this.extensions]
.reverse()
// With ProseMirror, first plugins within an array are executed first.
// In tiptap, we provide the ability to override plugins,
// so it feels more natural to run plugins at the end of an array first.
// Thats why we have to reverse the `extensions` array and sort again
// based on the `priority` option.
return ExtensionManager.sort([...this.extensions].reverse())
.map(extension => {
const context = {
name: extension.name,

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.39](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.38...@tiptap/extension-bubble-menu@2.0.0-beta.39) (2021-10-02)
**Note:** Version bump only for package @tiptap/extension-bubble-menu
# [2.0.0-beta.38](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.37...@tiptap/extension-bubble-menu@2.0.0-beta.38) (2021-09-29)
**Note:** Version bump only for package @tiptap/extension-bubble-menu

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-bubble-menu",
"description": "bubble-menu extension for tiptap",
"version": "2.0.0-beta.38",
"version": "2.0.0-beta.39",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.41](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-code-block-lowlight@2.0.0-beta.40...@tiptap/extension-code-block-lowlight@2.0.0-beta.41) (2021-10-02)
**Note:** Version bump only for package @tiptap/extension-code-block-lowlight
# [2.0.0-beta.40](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-code-block-lowlight@2.0.0-beta.39...@tiptap/extension-code-block-lowlight@2.0.0-beta.40) (2021-09-30)

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-code-block-lowlight",
"description": "code block extension for tiptap",
"version": "2.0.0-beta.40",
"version": "2.0.0-beta.41",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -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.0.0-beta.22](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration-cursor@2.0.0-beta.21...@tiptap/extension-collaboration-cursor@2.0.0-beta.22) (2021-10-04)
### Bug Fixes
* fix plugin order for collab, fix [#1973](https://github.com/ueberdosis/tiptap/issues/1973) ([2b16c2e](https://github.com/ueberdosis/tiptap/commit/2b16c2ea9633529657debff3cdbc74ff3a26b985))
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration-cursor@2.0.0-beta.20...@tiptap/extension-collaboration-cursor@2.0.0-beta.21) (2021-07-26)
**Note:** Version bump only for package @tiptap/extension-collaboration-cursor

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-collaboration-cursor",
"description": "collaboration cursor extension for tiptap",
"version": "2.0.0-beta.21",
"version": "2.0.0-beta.22",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -31,8 +31,6 @@ const awarenessStatesToArray = (states: Map<number, Record<string, any>>) => {
export const CollaborationCursor = Extension.create<CollaborationCursorOptions>({
name: 'collaborationCursor',
priority: 1000,
defaultOptions: {
provider: null,
user: {

View File

@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.22](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration@2.0.0-beta.21...@tiptap/extension-collaboration@2.0.0-beta.22) (2021-10-04)
### Bug Fixes
* fix plugin order for collab, fix [#1973](https://github.com/ueberdosis/tiptap/issues/1973) ([2b16c2e](https://github.com/ueberdosis/tiptap/commit/2b16c2ea9633529657debff3cdbc74ff3a26b985))
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration@2.0.0-beta.20...@tiptap/extension-collaboration@2.0.0-beta.21) (2021-10-03)
### Features
* add isChangeOrigin helper method ([92b6c5b](https://github.com/ueberdosis/tiptap/commit/92b6c5bdcef4589acaa824c2fc599787c02c1832))
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-collaboration@2.0.0-beta.19...@tiptap/extension-collaboration@2.0.0-beta.20) (2021-07-26)
**Note:** Version bump only for package @tiptap/extension-collaboration

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-collaboration",
"description": "collaboration extension for tiptap",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.22",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -24,6 +24,7 @@
"@tiptap/core": "^2.0.0-beta.1"
},
"dependencies": {
"prosemirror-state": "^1.3.4",
"y-prosemirror": "^1.0.9"
},
"repository": {

View File

@@ -41,6 +41,8 @@ export interface CollaborationOptions {
export const Collaboration = Extension.create<CollaborationOptions>({
name: 'collaboration',
priority: 1000,
defaultOptions: {
document: null,
field: 'default',

View File

@@ -0,0 +1,6 @@
import { ySyncPluginKey } from 'y-prosemirror'
import { Transaction } from 'prosemirror-state'
export function isChangeOrigin(transaction: Transaction): boolean {
return !!transaction.getMeta(ySyncPluginKey)
}

View File

@@ -1,5 +1,6 @@
import { Collaboration } from './collaboration'
export * from './collaboration'
export * from './helpers/isChangeOrigin'
export default Collaboration

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.33](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.32...@tiptap/extension-floating-menu@2.0.0-beta.33) (2021-10-02)
**Note:** Version bump only for package @tiptap/extension-floating-menu
# [2.0.0-beta.32](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.31...@tiptap/extension-floating-menu@2.0.0-beta.32) (2021-09-29)
**Note:** Version bump only for package @tiptap/extension-floating-menu

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-floating-menu",
"description": "floating-menu extension for tiptap",
"version": "2.0.0-beta.32",
"version": "2.0.0-beta.33",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.24](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-gapcursor@2.0.0-beta.23...@tiptap/extension-gapcursor@2.0.0-beta.24) (2021-10-02)
**Note:** Version bump only for package @tiptap/extension-gapcursor
# [2.0.0-beta.23](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-gapcursor@2.0.0-beta.22...@tiptap/extension-gapcursor@2.0.0-beta.23) (2021-09-29)
**Note:** Version bump only for package @tiptap/extension-gapcursor

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-gapcursor",
"description": "gapcursor extension for tiptap",
"version": "2.0.0-beta.23",
"version": "2.0.0-beta.24",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.20...@tiptap/extension-hard-break@2.0.0-beta.21) (2021-10-02)
**Note:** Version bump only for package @tiptap/extension-hard-break
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.19...@tiptap/extension-hard-break@2.0.0-beta.20) (2021-09-29)
**Note:** Version bump only for package @tiptap/extension-hard-break

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-hard-break",
"description": "hard break extension for tiptap",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-highlight@2.0.0-beta.20...@tiptap/extension-highlight@2.0.0-beta.21) (2021-10-02)
**Note:** Version bump only for package @tiptap/extension-highlight
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-highlight@2.0.0-beta.19...@tiptap/extension-highlight@2.0.0-beta.20) (2021-09-29)
**Note:** Version bump only for package @tiptap/extension-highlight

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-highlight",
"description": "highlight extension for tiptap",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-horizontal-rule@2.0.0-beta.20...@tiptap/extension-horizontal-rule@2.0.0-beta.21) (2021-10-02)
**Note:** Version bump only for package @tiptap/extension-horizontal-rule
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-horizontal-rule@2.0.0-beta.19...@tiptap/extension-horizontal-rule@2.0.0-beta.20) (2021-09-29)

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-horizontal-rule",
"description": "horizontal rule extension for tiptap",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.117](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.116...@tiptap/html@2.0.0-beta.117) (2021-10-03)
**Note:** Version bump only for package @tiptap/html
# [2.0.0-beta.116](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.115...@tiptap/html@2.0.0-beta.116) (2021-10-02)
**Note:** Version bump only for package @tiptap/html
# [2.0.0-beta.115](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.114...@tiptap/html@2.0.0-beta.115) (2021-09-30)
**Note:** Version bump only for package @tiptap/html

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/html",
"description": "utility package to render tiptap JSON as HTML",
"version": "2.0.0-beta.115",
"version": "2.0.0-beta.117",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -21,7 +21,7 @@
"dist"
],
"dependencies": {
"@tiptap/core": "^2.0.0-beta.116",
"@tiptap/core": "^2.0.0-beta.118",
"hostic-dom": "^0.8.7",
"prosemirror-model": "^1.14.3"
},

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.78](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.77...@tiptap/react@2.0.0-beta.78) (2021-10-02)
**Note:** Version bump only for package @tiptap/react
# [2.0.0-beta.77](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.76...@tiptap/react@2.0.0-beta.77) (2021-09-30)

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/react",
"description": "React components for tiptap",
"version": "2.0.0-beta.77",
"version": "2.0.0-beta.78",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -32,8 +32,8 @@
"react-dom": "^17.0.0"
},
"dependencies": {
"@tiptap/extension-bubble-menu": "^2.0.0-beta.38",
"@tiptap/extension-floating-menu": "^2.0.0-beta.32",
"@tiptap/extension-bubble-menu": "^2.0.0-beta.39",
"@tiptap/extension-floating-menu": "^2.0.0-beta.33",
"prosemirror-view": "^1.20.1"
},
"repository": {

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.117](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.116...@tiptap/starter-kit@2.0.0-beta.117) (2021-10-03)
**Note:** Version bump only for package @tiptap/starter-kit
# [2.0.0-beta.116](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.115...@tiptap/starter-kit@2.0.0-beta.116) (2021-10-02)
**Note:** Version bump only for package @tiptap/starter-kit
# [2.0.0-beta.115](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.114...@tiptap/starter-kit@2.0.0-beta.115) (2021-09-30)
**Note:** Version bump only for package @tiptap/starter-kit

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/starter-kit",
"description": "starter kit for tiptap",
"version": "2.0.0-beta.115",
"version": "2.0.0-beta.117",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -21,7 +21,7 @@
"dist"
],
"dependencies": {
"@tiptap/core": "^2.0.0-beta.116",
"@tiptap/core": "^2.0.0-beta.118",
"@tiptap/extension-blockquote": "^2.0.0-beta.15",
"@tiptap/extension-bold": "^2.0.0-beta.15",
"@tiptap/extension-bullet-list": "^2.0.0-beta.15",
@@ -29,11 +29,11 @@
"@tiptap/extension-code-block": "^2.0.0-beta.18",
"@tiptap/extension-document": "^2.0.0-beta.13",
"@tiptap/extension-dropcursor": "^2.0.0-beta.19",
"@tiptap/extension-gapcursor": "^2.0.0-beta.23",
"@tiptap/extension-hard-break": "^2.0.0-beta.20",
"@tiptap/extension-gapcursor": "^2.0.0-beta.24",
"@tiptap/extension-hard-break": "^2.0.0-beta.21",
"@tiptap/extension-heading": "^2.0.0-beta.15",
"@tiptap/extension-history": "^2.0.0-beta.16",
"@tiptap/extension-horizontal-rule": "^2.0.0-beta.20",
"@tiptap/extension-horizontal-rule": "^2.0.0-beta.21",
"@tiptap/extension-italic": "^2.0.0-beta.15",
"@tiptap/extension-list-item": "^2.0.0-beta.14",
"@tiptap/extension-ordered-list": "^2.0.0-beta.16",

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.0.0-beta.57](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.56...@tiptap/vue-2@2.0.0-beta.57) (2021-10-02)
**Note:** Version bump only for package @tiptap/vue-2
# [2.0.0-beta.56](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.55...@tiptap/vue-2@2.0.0-beta.56) (2021-09-29)
**Note:** Version bump only for package @tiptap/vue-2

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/vue-2",
"description": "Vue components for tiptap",
"version": "2.0.0-beta.56",
"version": "2.0.0-beta.57",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -28,8 +28,8 @@
"vue": "^2.6.0"
},
"dependencies": {
"@tiptap/extension-bubble-menu": "^2.0.0-beta.38",
"@tiptap/extension-floating-menu": "^2.0.0-beta.32",
"@tiptap/extension-bubble-menu": "^2.0.0-beta.39",
"@tiptap/extension-floating-menu": "^2.0.0-beta.33",
"prosemirror-view": "^1.20.1"
},
"repository": {

View File

@@ -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.0.0-beta.67](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.66...@tiptap/vue-3@2.0.0-beta.67) (2021-10-02)
### Bug Fixes
* fix reactive props, see [#1728](https://github.com/ueberdosis/tiptap/issues/1728) ([7f7f93d](https://github.com/ueberdosis/tiptap/commit/7f7f93dc1b4b56c7647de27a792e000b3513c226))
# [2.0.0-beta.66](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.65...@tiptap/vue-3@2.0.0-beta.66) (2021-09-29)
**Note:** Version bump only for package @tiptap/vue-3

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/vue-3",
"description": "Vue components for tiptap",
"version": "2.0.0-beta.66",
"version": "2.0.0-beta.67",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -28,8 +28,8 @@
"vue": "^3.0.0"
},
"dependencies": {
"@tiptap/extension-bubble-menu": "^2.0.0-beta.38",
"@tiptap/extension-floating-menu": "^2.0.0-beta.32",
"@tiptap/extension-bubble-menu": "^2.0.0-beta.39",
"@tiptap/extension-floating-menu": "^2.0.0-beta.33",
"prosemirror-state": "^1.3.4",
"prosemirror-view": "^1.20.1"
},

View File

@@ -88,11 +88,11 @@ class VueNodeView extends NodeView<Component, Editor, VueNodeViewRendererOptions
const extendedComponent = defineComponent({
extends: { ...this.component },
props: Object.keys(props),
setup: () => {
setup: reactiveProps => {
provide('onDragStart', onDragStart)
provide('decorationClasses', this.decorationClasses)
return (this.component as any).setup?.(props, {
return (this.component as any).setup?.(reactiveProps, {
expose: () => undefined,
})
},

View File

@@ -0,0 +1,69 @@
/// <reference types="cypress" />
import { Editor, Extension } from '@tiptap/core'
import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
describe('pluginOrder', () => {
it('should run keyboard shortcuts in correct order', () => {
const order: number[] = []
cy.window().then(({ document }) => {
const element = document.createElement('div')
document.body.append(element)
const editor = new Editor({
element,
extensions: [
Document,
Paragraph,
Text,
Extension.create({
priority: 1000,
addKeyboardShortcuts() {
return {
a: () => {
order.push(1)
return false
},
}
},
}),
Extension.create({
addKeyboardShortcuts() {
return {
a: () => {
order.push(3)
return false
},
}
},
}),
Extension.create({
addKeyboardShortcuts() {
return {
a: () => {
order.push(2)
return false
},
}
},
}),
],
})
cy.get('.ProseMirror')
.type('a')
.wait(100).then(() => {
expect(order).to.deep.eq([1, 2, 3])
editor.destroy()
})
})
})
})