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

This commit is contained in:
Hans Pagel
2021-04-08 22:12:52 +02:00
28 changed files with 104 additions and 28 deletions

View File

@@ -4,7 +4,7 @@ import { NodeViewWrapper, NodeViewContent } from '@tiptap/react'
export default () => {
return (
<NodeViewWrapper className="react-component-with-content">
<span className="label" contenteditable="false">React Component</span>
<span className="label" contentEditable={false}>React Component</span>
<NodeViewContent className="content" />
</NodeViewWrapper>

View File

@@ -13,9 +13,9 @@ By default, it doesnt trigger the update event. Passing `true` doesnt prev
## Usage
```js
// Remoe all content from the document
this.editor.commands.clearContent()
editor.commands.clearContent()
// Remove all content, and trigger the `update` event
this.editor.commands.clearContent(true)
editor.commands.clearContent(true)
```

View File

@@ -3,6 +3,6 @@ The `clearNodes` command normalizes nodes to a simple paragraph, it even normali
## Usage
```js
this.editor.commands.clearNodes()
editor.commands.clearNodes()
```

View File

@@ -11,13 +11,13 @@ The command is pretty flexible and takes plain text, HTML or even JSON as a valu
## Usage
```js
// Plain text
this.editor.commands.insertContent('Example Text')
editor.commands.insertContent('Example Text')
// HTML
this.editor.commands.insertContent('<h1>Example Text</h1>')
editor.commands.insertContent('<h1>Example Text</h1>')
// JSON/Nodes
this.editor.commands.insertContent({
editor.commands.insertContent({
type: 'heading',
attrs: {
level: 1,

View File

@@ -19,10 +19,10 @@ Options to configure the parsing can be passed during initialization and/or with
## Usage
```js
// HTML
this.editor.commands.setContent('<p>Example Text</p>')
editor.commands.setContent('<p>Example Text</p>')
// JSON
this.editor.commands.setContent({
editor.commands.setContent({
"type": "doc",
"content": [
{

View File

@@ -14,9 +14,9 @@ This expects an object with the attributes that need to be updated. It doesnt
## Usage
```js
// Update node attributes
this.editor.commands.updateAttributes('heading', { level: 1 })
editor.commands.updateAttributes('heading', { level: 1 })
// Update mark attributes
this.editor.commands.updateAttributes('highlight', { color: 'pink' })
editor.commands.updateAttributes('highlight', { color: 'pink' })
```

View File

@@ -78,7 +78,7 @@ import { NodeViewWrapper, NodeViewContent } from '@tiptap/react'
export default () => {
return (
<NodeViewWrapper className="react-component-with-content">
<span className="label" contenteditable="false">React Component</span>
<span className="label" contentEditable={false}>React Component</span>
<NodeViewContent className="content" />
</NodeViewWrapper>

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-next/compare/@tiptap/core@2.0.0-beta.20...@tiptap/core@2.0.0-beta.21) (2021-04-08)
**Note:** Version bump only for package @tiptap/core
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-beta.19...@tiptap/core@2.0.0-beta.20) (2021-04-07)

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/core",
"description": "headless rich text editor",
"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-next/compare/@tiptap/extension-mention@2.0.0-beta.20...@tiptap/extension-mention@2.0.0-beta.21) (2021-04-08)
**Note:** Version bump only for package @tiptap/extension-mention
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-mention@2.0.0-beta.19...@tiptap/extension-mention@2.0.0-beta.20) (2021-04-07)
**Note:** Version bump only for package @tiptap/extension-mention

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-mention",
"description": "mention extension for tiptap",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -25,6 +25,6 @@
"@tiptap/core": "^2.0.0-beta.1"
},
"dependencies": {
"@tiptap/suggestion": "^2.0.0-beta.20"
"@tiptap/suggestion": "^2.0.0-beta.21"
}
}

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.4](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-text-align@2.0.0-beta.3...@tiptap/extension-text-align@2.0.0-beta.4) (2021-04-08)
**Note:** Version bump only for package @tiptap/extension-text-align
# [2.0.0-beta.3](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-text-align@2.0.0-beta.2...@tiptap/extension-text-align@2.0.0-beta.3) (2021-04-07)

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/extension-text-align",
"description": "text align extension for tiptap",
"version": "2.0.0-beta.3",
"version": "2.0.0-beta.4",
"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-next/compare/@tiptap/html@2.0.0-beta.20...@tiptap/html@2.0.0-beta.21) (2021-04-08)
**Note:** Version bump only for package @tiptap/html
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/html@2.0.0-beta.19...@tiptap/html@2.0.0-beta.20) (2021-04-07)
**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.20",
"version": "2.0.0-beta.21",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -22,7 +22,7 @@
"dist"
],
"dependencies": {
"@tiptap/core": "^2.0.0-beta.20",
"@tiptap/core": "^2.0.0-beta.21",
"hostic-dom": "^0.8.6",
"prosemirror-model": "^1.14.0"
}

View File

@@ -3,6 +3,18 @@
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.17](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.16...@tiptap/react@2.0.0-beta.17) (2021-04-08)
### Bug Fixes
* improve node view error message ([536663f](https://github.com/ueberdosis/tiptap-next/commit/536663f816039df6e3d8de23989f343d78e5d08e))
* make `as` prop optional ([f8dec5f](https://github.com/ueberdosis/tiptap-next/commit/f8dec5f905baf5692dd257b3dddec3de2bcad1a1))
# [2.0.0-beta.16](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/react@2.0.0-beta.15...@tiptap/react@2.0.0-beta.16) (2021-04-07)
**Note:** Version bump only for package @tiptap/react

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/react",
"description": "React components for tiptap",
"version": "2.0.0-beta.16",
"version": "2.0.0-beta.17",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",

View File

@@ -2,7 +2,7 @@ import React from 'react'
export interface NodeViewContentProps {
className?: string,
as: React.ElementType,
as?: React.ElementType,
}
export const NodeViewContent: React.FC<NodeViewContentProps> = props => {

View File

@@ -3,7 +3,7 @@ import { useReactNodeView } from './useReactNodeView'
export interface NodeViewWrapperProps {
className?: string,
as: React.ElementType,
as?: React.ElementType,
}
export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = props => {

View File

@@ -63,7 +63,7 @@ class ReactNodeView extends NodeView<React.FunctionComponent, Editor> {
get dom() {
if (!this.renderer.element.firstElementChild?.hasAttribute('data-node-view-wrapper')) {
throw Error('Please use the ReactViewWrapper component for your node view.')
throw Error('Please use the NodeViewWrapper component for your node view.')
}
return this.renderer.element

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.16](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/starter-kit@2.0.0-beta.15...@tiptap/starter-kit@2.0.0-beta.16) (2021-04-08)
**Note:** Version bump only for package @tiptap/starter-kit
# [2.0.0-beta.15](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/starter-kit@2.0.0-beta.14...@tiptap/starter-kit@2.0.0-beta.15) (2021-04-07)
**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.15",
"version": "2.0.0-beta.16",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -22,7 +22,7 @@
"dist"
],
"dependencies": {
"@tiptap/core": "^2.0.0-beta.20",
"@tiptap/core": "^2.0.0-beta.21",
"@tiptap/extension-blockquote": "^2.0.0-beta.1",
"@tiptap/extension-bold": "^2.0.0-beta.1",
"@tiptap/extension-bullet-list": "^2.0.0-beta.1",

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-next/compare/@tiptap/suggestion@2.0.0-beta.20...@tiptap/suggestion@2.0.0-beta.21) (2021-04-08)
**Note:** Version bump only for package @tiptap/suggestion
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/suggestion@2.0.0-beta.19...@tiptap/suggestion@2.0.0-beta.20) (2021-04-07)
**Note:** Version bump only for package @tiptap/suggestion

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/suggestion",
"description": "suggestion plugin for tiptap",
"version": "2.0.0-beta.20",
"version": "2.0.0-beta.21",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",
@@ -22,7 +22,7 @@
"dist"
],
"dependencies": {
"@tiptap/core": "^2.0.0-beta.20",
"@tiptap/core": "^2.0.0-beta.21",
"prosemirror-model": "^1.14.0",
"prosemirror-state": "^1.3.4",
"prosemirror-view": "^1.18.2"

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.15](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/vue-2@2.0.0-beta.14...@tiptap/vue-2@2.0.0-beta.15) (2021-04-08)
**Note:** Version bump only for package @tiptap/vue-2
# [2.0.0-beta.14](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/vue-2@2.0.0-beta.13...@tiptap/vue-2@2.0.0-beta.14) (2021-04-03)
**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.14",
"version": "2.0.0-beta.15",
"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.18](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/vue-3@2.0.0-beta.17...@tiptap/vue-3@2.0.0-beta.18) (2021-04-08)
**Note:** Version bump only for package @tiptap/vue-3
# [2.0.0-beta.17](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/vue-3@2.0.0-beta.16...@tiptap/vue-3@2.0.0-beta.17) (2021-04-06)

View File

@@ -1,7 +1,7 @@
{
"name": "@tiptap/vue-3",
"description": "Vue components for tiptap",
"version": "2.0.0-beta.17",
"version": "2.0.0-beta.18",
"homepage": "https://tiptap.dev",
"keywords": [
"tiptap",