Merge remote-tracking branch 'upstream/main'
This commit is contained in:
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
@@ -13,11 +13,3 @@ updates:
|
|||||||
reviewers:
|
reviewers:
|
||||||
- 'hanspagel'
|
- 'hanspagel'
|
||||||
|
|
||||||
- package-ecosystem: 'npm'
|
|
||||||
directory: '/'
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
schedule:
|
|
||||||
interval: 'weekly'
|
|
||||||
day: 'monday'
|
|
||||||
reviewers:
|
|
||||||
- 'philippkuehn'
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"canvas": "^2.8.0",
|
"canvas": "^2.8.0",
|
||||||
"collect.js": "^4.28.6",
|
"collect.js": "^4.28.6",
|
||||||
"d3": "^6.6.1",
|
"d3": "^6.6.1",
|
||||||
"globby": "^11.0.3",
|
"globby": "^11.0.4",
|
||||||
"gridsome": "0.7.23",
|
"gridsome": "0.7.23",
|
||||||
"iframe-resizer": "^4.3.2",
|
"iframe-resizer": "^4.3.2",
|
||||||
"portal-vue": "^2.1.7",
|
"portal-vue": "^2.1.7",
|
||||||
@@ -36,11 +36,11 @@
|
|||||||
"yjs": "^13.5.10"
|
"yjs": "^13.5.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
||||||
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
|
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
||||||
"@babel/plugin-syntax-class-properties": "^7.12.13",
|
"@babel/plugin-syntax-class-properties": "^7.12.13",
|
||||||
"@babel/preset-env": "^7.14.4",
|
"@babel/preset-env": "^7.14.5",
|
||||||
"@babel/preset-react": "^7.13.13",
|
"@babel/preset-react": "^7.14.5",
|
||||||
"html-loader": "^1.3.2",
|
"html-loader": "^1.3.2",
|
||||||
"node-sass": "^5.0.0",
|
"node-sass": "^5.0.0",
|
||||||
"sass-loader": "^10.1.1",
|
"sass-loader": "^10.1.1",
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ const getRandomElement = list => {
|
|||||||
|
|
||||||
const getRandomRoom = () => {
|
const getRandomRoom = () => {
|
||||||
return getRandomElement([
|
return getRandomElement([
|
||||||
'room.1',
|
'room.4',
|
||||||
'room.2',
|
'room.5',
|
||||||
'room.3',
|
'room.6',
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default () => {
|
|||||||
],
|
],
|
||||||
content: `
|
content: `
|
||||||
<p>
|
<p>
|
||||||
What do you all think about the new <span data-mention="Winona Ryder"></span> movie?
|
What do you all think about the new <span data-mention data-id="Winona Ryder"></span> movie?
|
||||||
</p>
|
</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
],
|
],
|
||||||
content: `
|
content: `
|
||||||
<p>
|
<p>
|
||||||
What do you all think about the new <span data-mention="Winona Ryder"></span> movie?
|
What do you all think about the new <span data-mention data-id="Winona Ryder"></span> movie?
|
||||||
</p>
|
</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -63,7 +63,9 @@ export default {
|
|||||||
this.editor = new Editor({
|
this.editor = new Editor({
|
||||||
extensions: [
|
extensions: [
|
||||||
StarterKit,
|
StarterKit,
|
||||||
TextAlign,
|
TextAlign.configure({
|
||||||
|
types: ['heading', 'paragraph'],
|
||||||
|
}),
|
||||||
Highlight,
|
Highlight,
|
||||||
],
|
],
|
||||||
content: `
|
content: `
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import { Node as ProsemirrorNode } from 'prosemirror-model'
|
interface Result {
|
||||||
|
|
||||||
export interface Result {
|
|
||||||
message: string,
|
message: string,
|
||||||
from: number,
|
from: number,
|
||||||
to: number,
|
to: number,
|
||||||
fix?: Function
|
fix?: null
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class LinterPlugin {
|
export default class LinterPlugin {
|
||||||
|
|||||||
@@ -1,80 +0,0 @@
|
|||||||
import { Node, mergeAttributes } from '@tiptap/core'
|
|
||||||
import { VueNodeViewRenderer } from '@tiptap/vue-2'
|
|
||||||
import { Plugin } from 'prosemirror-state'
|
|
||||||
|
|
||||||
import CustomNodeView from './CustomNode.vue'
|
|
||||||
|
|
||||||
export default Node.create({
|
|
||||||
name: 'customNode',
|
|
||||||
isBlock: true,
|
|
||||||
inline: false,
|
|
||||||
group: 'block',
|
|
||||||
draggable: true,
|
|
||||||
isolating: true,
|
|
||||||
defining: true,
|
|
||||||
selectable: true,
|
|
||||||
|
|
||||||
addAttributes() {
|
|
||||||
return {
|
|
||||||
nest: { default: false },
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
parseHTML() {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
tag: 'custom-node',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
renderHTML({ HTMLAttributes }) {
|
|
||||||
return ['custom-node', mergeAttributes(HTMLAttributes)]
|
|
||||||
},
|
|
||||||
|
|
||||||
addNodeView() {
|
|
||||||
return VueNodeViewRenderer(CustomNodeView)
|
|
||||||
},
|
|
||||||
|
|
||||||
addProseMirrorPlugins() {
|
|
||||||
return [
|
|
||||||
new Plugin({
|
|
||||||
props: {
|
|
||||||
handleKeyDown: (view, event) => {
|
|
||||||
// Prevent _any_ key from clearing block. As soon as you start typing,
|
|
||||||
// and a block is focused, it'll blast the block away.
|
|
||||||
view.state.typing = true
|
|
||||||
},
|
|
||||||
|
|
||||||
handlePaste: (view, event, slice) => {
|
|
||||||
// Prevent pasting overwriting block
|
|
||||||
view.state.pasting = true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
filterTransaction: (transaction, state) => {
|
|
||||||
let result = true
|
|
||||||
|
|
||||||
// Check if our flags are set, and if the selected node is a custom node
|
|
||||||
if (state.typing || state.pasting) {
|
|
||||||
transaction.mapping.maps.forEach(map => {
|
|
||||||
map.forEach((oldStart, oldEnd, newStart, newEnd) => {
|
|
||||||
state.doc.nodesBetween(
|
|
||||||
oldStart,
|
|
||||||
oldEnd,
|
|
||||||
(node, number, pos, parent, index) => {
|
|
||||||
if (node.type.name === 'customNode') {
|
|
||||||
result = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
]
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
<template>
|
|
||||||
<node-view-wrapper class="draggable-item" :class="{ active: selected }">
|
|
||||||
<div
|
|
||||||
class="drag-handle"
|
|
||||||
contenteditable="false"
|
|
||||||
draggable="true"
|
|
||||||
data-drag-handle
|
|
||||||
/>
|
|
||||||
<div class="draggable-nested">
|
|
||||||
<tiptap-nested />
|
|
||||||
</div>
|
|
||||||
</node-view-wrapper>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { NodeViewWrapper } from '@tiptap/vue-2'
|
|
||||||
import TiptapNested from './Nested.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'CustomNode',
|
|
||||||
|
|
||||||
components: {
|
|
||||||
NodeViewWrapper,
|
|
||||||
TiptapNested,
|
|
||||||
},
|
|
||||||
|
|
||||||
props: {
|
|
||||||
editor: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
|
|
||||||
node: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
|
|
||||||
decorations: {
|
|
||||||
type: Array,
|
|
||||||
default: () => [],
|
|
||||||
},
|
|
||||||
|
|
||||||
selected: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
|
|
||||||
extension: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
|
|
||||||
getPos: {
|
|
||||||
type: Function,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
|
|
||||||
updateAttributes: {
|
|
||||||
type: Function,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.draggable-item {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding: 0.5rem;
|
|
||||||
margin: 0.5rem 0;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
background: white;
|
|
||||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0px 10px 20px rgba(0, 0, 0, 0.1);
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
border: 1px red solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
margin: 0 0 0.5rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drag-handle {
|
|
||||||
flex: 0 0 auto;
|
|
||||||
position: relative;
|
|
||||||
width: 1rem;
|
|
||||||
height: 1rem;
|
|
||||||
top: 0.3rem;
|
|
||||||
margin-right: 0.5rem;
|
|
||||||
cursor: grab;
|
|
||||||
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 16"><path fill-opacity="0.2" d="M4 14c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zM2 6C.9 6 0 6.9 0 8s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6C.9 0 0 .9 0 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" /></svg>');
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: contain;
|
|
||||||
background-position: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.draggable-nested {
|
|
||||||
flex: 1
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="editor-nested" v-if="editor">
|
|
||||||
<editor-content :editor="editor" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
|
||||||
import StarterKit from '@tiptap/starter-kit'
|
|
||||||
import CustomNode from './CustomNode.js'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
EditorContent,
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
editor: null,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
this.editor = new Editor({
|
|
||||||
content: `
|
|
||||||
Nested intro text`,
|
|
||||||
extensions: [StarterKit, CustomNode],
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
beforeDestroy() {
|
|
||||||
this.editor.destroy()
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.editor-nested {
|
|
||||||
padding: 10px;
|
|
||||||
border: 1px gray solid;
|
|
||||||
}
|
|
||||||
.ProseMirror {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="editor" v-if="editor">
|
|
||||||
<editor-content :editor="editor" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { Editor, EditorContent } from '@tiptap/vue-2'
|
|
||||||
import StarterKit from '@tiptap/starter-kit'
|
|
||||||
import CustomNode from './CustomNode.js'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
EditorContent,
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
editor: null,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
this.editor = new Editor({
|
|
||||||
content: 'Testing<custom-node></custom-node>Text',
|
|
||||||
extensions: [StarterKit, CustomNode],
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
beforeDestroy() {
|
|
||||||
this.editor.destroy()
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor {
|
|
||||||
/* TODO: Conflicts with other demos */
|
|
||||||
/* padding: 10px; */
|
|
||||||
border: 1px gray solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ProseMirror {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -45,7 +45,9 @@ export default {
|
|||||||
Paragraph,
|
Paragraph,
|
||||||
Text,
|
Text,
|
||||||
Heading,
|
Heading,
|
||||||
TextAlign,
|
TextAlign.configure({
|
||||||
|
types: ['heading', 'paragraph'],
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
content: `
|
content: `
|
||||||
<h2>Heading</h2>
|
<h2>Heading</h2>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ context('/demos/Marks/Subscript', () => {
|
|||||||
|
|
||||||
it('should transform inline style to sub tags', () => {
|
it('should transform inline style to sub tags', () => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<p><span style="vertical-align: middle">Example Text</span></p>')
|
editor.commands.setContent('<p><span style="vertical-align: sub">Example Text</span></p>')
|
||||||
expect(editor.getHTML()).to.eq('<p><sub>Example Text</sub></p>')
|
expect(editor.getHTML()).to.eq('<p><sub>Example Text</sub></p>')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -82,9 +82,9 @@ export default {
|
|||||||
],
|
],
|
||||||
content: `
|
content: `
|
||||||
<p>Hi everyone! Don’t forget the daily stand up at 8 AM.</p>
|
<p>Hi everyone! Don’t forget the daily stand up at 8 AM.</p>
|
||||||
<p><span data-mention="Jennifer Grey"></span> Would you mind to share what you’ve been working on lately? We fear not much happened since Dirty Dancing.
|
<p><span data-mention data-id="Jennifer Grey"></span> Would you mind to share what you’ve been working on lately? We fear not much happened since Dirty Dancing.
|
||||||
<p><span data-mention="Winona Ryder"></span> <span data-mention="Axl Rose"></span> Let’s go through your most important points quickly.</p>
|
<p><span data-mention data-id="Winona Ryder"></span> <span data-mention data-id="Axl Rose"></span> Let’s go through your most important points quickly.</p>
|
||||||
<p>I have a meeting with <span data-mention="Christina Applegate"></span> and don’t want to come late.</p>
|
<p>I have a meeting with <span data-mention data-id="Christina Applegate"></span> and don’t want to come late.</p>
|
||||||
<p>– Thanks, your big boss</p>
|
<p>– Thanks, your big boss</p>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
TaskItem,
|
TaskItem,
|
||||||
],
|
],
|
||||||
content: `
|
content: `
|
||||||
<ul data-type="task_list">
|
<ul data-type="taskList">
|
||||||
<li data-type="taskItem" data-checked="true">A list item</li>
|
<li data-type="taskItem" data-checked="true">A list item</li>
|
||||||
<li data-type="taskItem" data-checked="false">And another one</li>
|
<li data-type="taskItem" data-checked="false">And another one</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export default {
|
|||||||
TaskItem,
|
TaskItem,
|
||||||
],
|
],
|
||||||
content: `
|
content: `
|
||||||
<ul data-type="task_list">
|
<ul data-type="taskList">
|
||||||
<li data-type="taskItem" data-checked="true">A list item</li>
|
<li data-type="taskItem" data-checked="true">A list item</li>
|
||||||
<li data-type="taskItem" data-checked="false">And another one</li>
|
<li data-type="taskItem" data-checked="false">And another one</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ yarn add @tiptap/extension-dropcursor
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ------ | -------- | --------- | --------------------------------------------------------------------- |
|
| ------ | -------- | ---------------- | --------------------------------------------------------------------- |
|
||||||
| color | `String` | `'black'` | Color of the dropcursor. |
|
| color | `String` | `'currentcolor'` | Color of the dropcursor. |
|
||||||
| width | `Number` | `1` | Width of the dropcursor. |
|
| width | `Number` | `1` | Width of the dropcursor. |
|
||||||
| class | `String` | – | One or multiple CSS classes that should be applied to the dropcursor. |
|
| class | `String` | – | One or multiple CSS classes that should be applied to the dropcursor. |
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-dropcursor/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-dropcursor/)
|
[packages/extension-dropcursor/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-dropcursor/)
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ yarn add @tiptap/extension-text-align
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| ---------------- | -------- | ---------------------------------------- | -------------------------------------------------------------------- |
|
| ---------------- | -------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
||||||
| types | `Array` | `['heading', 'paragraph']` | A list of nodes where the text align attribute should be applied to. |
|
| types | `Array` | `[]` | A list of nodes where the text align attribute should be applied to. Usually something like `['heading', 'paragraph']`.|
|
||||||
| alignments | `Array` | `['left', 'center', 'right', 'justify']` | A list of available options for the text align attribute. |
|
| alignments | `Array` | `['left', 'center', 'right', 'justify']` | A list of available options for the text align attribute. |
|
||||||
| defaultAlignment | `String` | `'left'` | The default text align. |
|
| defaultAlignment | `String` | `'left'` | The default text align. |
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
| Command | Parameters | Description |
|
| Command | Parameters | Description |
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ Most of the core extensions register their own keyboard shortcuts. Depending on
|
|||||||
| Right align | `Control` `Shift` `R` | `Cmd` `Shift` `R` |
|
| Right align | `Control` `Shift` `R` | `Cmd` `Shift` `R` |
|
||||||
| Justify | `Control` `Shift` `J` | `Cmd` `Shift` `J` |
|
| Justify | `Control` `Shift` `J` | `Cmd` `Shift` `J` |
|
||||||
| Code block | `Control` `Alt` `C` | `Cmd` `Alt` `C` |
|
| Code block | `Control` `Alt` `C` | `Cmd` `Alt` `C` |
|
||||||
|
| Subscript | `Control` `,` | `Cmd` `,` |
|
||||||
|
| Superscript | `Control` `.` | `Cmd` `.` |
|
||||||
|
|
||||||
<!--| Toggle task| `Control` `Enter` | `Cmd` `Enter` | -->
|
<!--| Toggle task| `Control` `Enter` | `Cmd` `Enter` | -->
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ yarn add @tiptap/extension-subscript
|
|||||||
| toggleSubscript | — | Toggle subscript mark. |
|
| toggleSubscript | — | Toggle subscript mark. |
|
||||||
| unsetSubscript | — | Remove subscript mark. |
|
| unsetSubscript | — | Remove subscript mark. |
|
||||||
|
|
||||||
|
## Keyboard shortcuts
|
||||||
|
* Windows/Linux: `Control` `,`
|
||||||
|
* macOS: `Cmd` `,`
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-subscript/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-subscript/)
|
[packages/extension-subscript/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-subscript/)
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ yarn add @tiptap/extension-superscript
|
|||||||
| toggleSuperscript | — | Toggle superscript mark. |
|
| toggleSuperscript | — | Toggle superscript mark. |
|
||||||
| unsetSuperscript | — | Remove superscript mark. |
|
| unsetSuperscript | — | Remove superscript mark. |
|
||||||
|
|
||||||
|
## Keyboard shortcuts
|
||||||
|
* Windows/Linux: `Control` `.`
|
||||||
|
* macOS: `Cmd` `.`
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-superscript/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-superscript/)
|
[packages/extension-superscript/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-superscript/)
|
||||||
|
|
||||||
|
|||||||
@@ -42,10 +42,11 @@ And yes, we plan to support React, too. Meanwhile, you can roll your own `ReactR
|
|||||||
It’s also possible to use Vanilla JavaScript, but that is probably a lot more work.
|
It’s also possible to use Vanilla JavaScript, but that is probably a lot more work.
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
| Option | Type | Default | Description |
|
| Option | Type | Default | Description |
|
||||||
| -------------- | -------- | ------- | --------------------------------------------------------------------- |
|
| -------------- | -------- | -------------------------- | --------------------------------------------------------------------- |
|
||||||
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
| HTMLAttributes | `Object` | `{}` | Custom HTML attributes that should be added to the rendered HTML tag. |
|
||||||
| suggestion | `Object` | `{ … }` | [Read more](/api/utilities/suggestion) |
|
| renderLabel | `String` | `({ options, node }) => …` | Define how a mention label should be rendered. |
|
||||||
|
| suggestion | `Object` | `{ … }` | [Read more](/api/utilities/suggestion) |
|
||||||
|
|
||||||
## Source code
|
## Source code
|
||||||
[packages/extension-mention/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-mention/)
|
[packages/extension-mention/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-mention/)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
[](https://www.npmjs.com/package/@tiptap/extension-task-list)
|
[](https://www.npmjs.com/package/@tiptap/extension-task-list)
|
||||||
[](https://npmcharts.com/compare/@tiptap/extension-task-list?minimal=true)
|
[](https://npmcharts.com/compare/@tiptap/extension-task-list?minimal=true)
|
||||||
|
|
||||||
This extension enables you to use task lists in the editor. They are rendered as `<ul data-type="task_list">`. This implementation doesn’t require any framework, it’s using Vanilla JavaScript only.
|
This extension enables you to use task lists in the editor. They are rendered as `<ul data-type="taskList">`. This implementation doesn’t require any framework, it’s using Vanilla JavaScript only.
|
||||||
|
|
||||||
Type <code>[ ] </code> or <code>[x] </code> at the beginning of a new line and it will magically transform to a task list.
|
Type <code>[ ] </code> or <code>[x] </code> at the beginning of a new line and it will magically transform to a task list.
|
||||||
|
|
||||||
|
|||||||
20
package.json
20
package.json
@@ -25,29 +25,29 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@atomico/rollup-plugin-sizes": "^1.1.4",
|
"@atomico/rollup-plugin-sizes": "^1.1.4",
|
||||||
"@babel/core": "^7.14.3",
|
"@babel/core": "^7.14.6",
|
||||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2",
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
|
||||||
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
|
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
||||||
"@babel/preset-env": "^7.14.4",
|
"@babel/preset-env": "^7.14.5",
|
||||||
"@babel/preset-react": "^7.13.13",
|
"@babel/preset-react": "^7.14.5",
|
||||||
"@lerna/batch-packages": "^3.16.0",
|
"@lerna/batch-packages": "^3.16.0",
|
||||||
"@lerna/filter-packages": "^3.18.0",
|
"@lerna/filter-packages": "^3.18.0",
|
||||||
"@lerna/project": "^3.21.0",
|
"@lerna/project": "^3.21.0",
|
||||||
"@rollup/plugin-babel": "^5.3.0",
|
"@rollup/plugin-babel": "^5.3.0",
|
||||||
"@rollup/plugin-commonjs": "^19.0.0",
|
"@rollup/plugin-commonjs": "^19.0.0",
|
||||||
"@rollup/plugin-node-resolve": "^13.0.0",
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.26.1",
|
"@typescript-eslint/eslint-plugin": "^4.27.0",
|
||||||
"@typescript-eslint/parser": "^4.26.1",
|
"@typescript-eslint/parser": "^4.27.0",
|
||||||
"cypress": "^7.4.0",
|
"cypress": "^7.5.0",
|
||||||
"eslint": "^7.28.0",
|
"eslint": "^7.28.0",
|
||||||
"eslint-config-airbnb-base": "^14.2.0",
|
"eslint-config-airbnb-base": "^14.2.0",
|
||||||
"eslint-plugin-cypress": "^2.11.3",
|
"eslint-plugin-cypress": "^2.11.3",
|
||||||
"eslint-plugin-html": "^6.1.0",
|
"eslint-plugin-html": "^6.1.0",
|
||||||
"eslint-plugin-import": "^2.23.4",
|
"eslint-plugin-import": "^2.23.4",
|
||||||
"eslint-plugin-vue": "^7.10.0",
|
"eslint-plugin-vue": "^7.11.1",
|
||||||
"lerna": "^3.22.1",
|
"lerna": "^3.22.1",
|
||||||
"minimist": "^1.2.5",
|
"minimist": "^1.2.5",
|
||||||
"rollup": "^2.51.0",
|
"rollup": "^2.52.1",
|
||||||
"rollup-plugin-auto-external": "^2.0.0",
|
"rollup-plugin-auto-external": "^2.0.0",
|
||||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||||
"rollup-plugin-typescript2": "^0.30.0",
|
"rollup-plugin-typescript2": "^0.30.0",
|
||||||
|
|||||||
@@ -3,6 +3,37 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.84](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.83...@tiptap/core@2.0.0-beta.84) (2021-06-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* improve types for generateHTML ([502b5b1](https://github.com/ueberdosis/tiptap/commit/502b5b1cc9f1a8beb49ef2da81a9db56c7e92424))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.83](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.82...@tiptap/core@2.0.0-beta.83) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/core
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.82](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.81...@tiptap/core@2.0.0-beta.82) (2021-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* check for atom nodes in ignoreMutation handler, fix [#1448](https://github.com/ueberdosis/tiptap/issues/1448) ([2deb07f](https://github.com/ueberdosis/tiptap/commit/2deb07fb005d4376790d1e22b3fc53353d1665eb))
|
||||||
|
* remove editable check in updateAttributes, fix [#1415](https://github.com/ueberdosis/tiptap/issues/1415) ([fbc8fff](https://github.com/ueberdosis/tiptap/commit/fbc8fffb701dd78994ca4e20c32a940236bf768d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.81](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.80...@tiptap/core@2.0.0-beta.81) (2021-06-07)
|
# [2.0.0-beta.81](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.80...@tiptap/core@2.0.0-beta.81) (2021-06-07)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/core",
|
"name": "@tiptap/core",
|
||||||
"description": "headless rich text editor",
|
"description": "headless rich text editor",
|
||||||
"version": "2.0.0-beta.81",
|
"version": "2.0.0-beta.84",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"prosemirror-commands": "^1.1.9",
|
"prosemirror-commands": "^1.1.9",
|
||||||
"prosemirror-inputrules": "^1.1.3",
|
"prosemirror-inputrules": "^1.1.3",
|
||||||
"prosemirror-keymap": "^1.1.3",
|
"prosemirror-keymap": "^1.1.3",
|
||||||
"prosemirror-model": "^1.14.1",
|
"prosemirror-model": "^1.14.2",
|
||||||
"prosemirror-schema-list": "^1.1.4",
|
"prosemirror-schema-list": "^1.1.4",
|
||||||
"prosemirror-state": "^1.3.4",
|
"prosemirror-state": "^1.3.4",
|
||||||
"prosemirror-transform": "^1.3.2",
|
"prosemirror-transform": "^1.3.2",
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export class NodeView<Component, Editor extends CoreEditor = CoreEditor> impleme
|
|||||||
|
|
||||||
// a leaf/atom node is like a black box for ProseMirror
|
// a leaf/atom node is like a black box for ProseMirror
|
||||||
// and should be fully handled by the node view
|
// and should be fully handled by the node view
|
||||||
if (this.node.isLeaf) {
|
if (this.node.isLeaf || this.node.isAtom) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,18 +224,16 @@ export class NodeView<Component, Editor extends CoreEditor = CoreEditor> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateAttributes(attributes: {}) {
|
updateAttributes(attributes: {}) {
|
||||||
if (!this.editor.view.editable) {
|
this.editor.commands.command(({ tr }) => {
|
||||||
return
|
const pos = this.getPos()
|
||||||
}
|
|
||||||
|
|
||||||
const { state } = this.editor.view
|
tr.setNodeMarkup(pos, undefined, {
|
||||||
const pos = this.getPos()
|
...this.node.attrs,
|
||||||
const transaction = state.tr.setNodeMarkup(pos, undefined, {
|
...attributes,
|
||||||
...this.node.attrs,
|
})
|
||||||
...attributes,
|
|
||||||
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
this.editor.view.dispatch(transaction)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteNode(): void {
|
deleteNode(): void {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Node } from 'prosemirror-model'
|
import { Node } from 'prosemirror-model'
|
||||||
import getSchema from './getSchema'
|
import getSchema from './getSchema'
|
||||||
import getHTMLFromFragment from './getHTMLFromFragment'
|
import getHTMLFromFragment from './getHTMLFromFragment'
|
||||||
import { Extensions } from '../types'
|
import { Extensions, JSONContent } from '../types'
|
||||||
|
|
||||||
export default function generateHTML(doc: object, extensions: Extensions): string {
|
export default function generateHTML(doc: JSONContent, extensions: Extensions): string {
|
||||||
const schema = getSchema(extensions)
|
const schema = getSchema(extensions)
|
||||||
const contentNode = Node.fromJSON(schema, doc)
|
const contentNode = Node.fromJSON(schema, doc)
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,37 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.23](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.22...@tiptap/extension-bubble-menu@2.0.0-beta.23) (2021-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fix a bug where bubble menu does not appear when selection starts from empty paragraph node, fix [#1474](https://github.com/ueberdosis/tiptap/issues/1474) ([f12b127](https://github.com/ueberdosis/tiptap/commit/f12b1273f24984806394e3deb431823a9d00ba79))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.22](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.21...@tiptap/extension-bubble-menu@2.0.0-beta.22) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-bubble-menu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.20...@tiptap/extension-bubble-menu@2.0.0-beta.21) (2021-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* hide bubble menu on drag, fix [#1443](https://github.com/ueberdosis/tiptap/issues/1443) ([6034eb9](https://github.com/ueberdosis/tiptap/commit/6034eb9b30c3fe01ece9079c84c91ba9c6184518))
|
||||||
|
* show bubble menu for atom nodes even if there is no text content, fix [#1446](https://github.com/ueberdosis/tiptap/issues/1446) ([a3a7650](https://github.com/ueberdosis/tiptap/commit/a3a76507844cefc28111b9636c511ad9ef52ad28))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.19...@tiptap/extension-bubble-menu@2.0.0-beta.20) (2021-05-27)
|
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.19...@tiptap/extension-bubble-menu@2.0.0-beta.20) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/extension-bubble-menu
|
**Note:** Version bump only for package @tiptap/extension-bubble-menu
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-bubble-menu",
|
"name": "@tiptap/extension-bubble-menu",
|
||||||
"description": "bubble-menu extension for tiptap",
|
"description": "bubble-menu extension for tiptap",
|
||||||
"version": "2.0.0-beta.20",
|
"version": "2.0.0-beta.23",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { Editor, posToDOMRect, isNodeSelection } from '@tiptap/core'
|
import {
|
||||||
|
Editor,
|
||||||
|
posToDOMRect,
|
||||||
|
isTextSelection,
|
||||||
|
isNodeSelection,
|
||||||
|
} from '@tiptap/core'
|
||||||
import { EditorState, Plugin, PluginKey } from 'prosemirror-state'
|
import { EditorState, Plugin, PluginKey } from 'prosemirror-state'
|
||||||
import { EditorView } from 'prosemirror-view'
|
import { EditorView } from 'prosemirror-view'
|
||||||
import tippy, { Instance, Props } from 'tippy.js'
|
import tippy, { Instance, Props } from 'tippy.js'
|
||||||
@@ -34,6 +39,7 @@ export class BubbleMenuView {
|
|||||||
this.element = element
|
this.element = element
|
||||||
this.view = view
|
this.view = view
|
||||||
this.element.addEventListener('mousedown', this.mousedownHandler, { capture: true })
|
this.element.addEventListener('mousedown', this.mousedownHandler, { capture: true })
|
||||||
|
this.view.dom.addEventListener('dragstart', this.dragstartHandler)
|
||||||
this.editor.on('focus', this.focusHandler)
|
this.editor.on('focus', this.focusHandler)
|
||||||
this.editor.on('blur', this.blurHandler)
|
this.editor.on('blur', this.blurHandler)
|
||||||
this.createTooltip(tippyOptions)
|
this.createTooltip(tippyOptions)
|
||||||
@@ -44,6 +50,10 @@ export class BubbleMenuView {
|
|||||||
this.preventHide = true
|
this.preventHide = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dragstartHandler = () => {
|
||||||
|
this.hide()
|
||||||
|
}
|
||||||
|
|
||||||
focusHandler = () => {
|
focusHandler = () => {
|
||||||
// we use `setTimeout` to make sure `selection` is already updated
|
// we use `setTimeout` to make sure `selection` is already updated
|
||||||
setTimeout(() => this.update(this.editor.view))
|
setTimeout(() => this.update(this.editor.view))
|
||||||
@@ -88,7 +98,7 @@ export class BubbleMenuView {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const { empty, $anchor, ranges } = selection
|
const { empty, ranges } = selection
|
||||||
|
|
||||||
// support for CellSelections
|
// support for CellSelections
|
||||||
const from = Math.min(...ranges.map(range => range.$from.pos))
|
const from = Math.min(...ranges.map(range => range.$from.pos))
|
||||||
@@ -97,7 +107,10 @@ export class BubbleMenuView {
|
|||||||
// Sometime check for `empty` is not enough.
|
// Sometime check for `empty` is not enough.
|
||||||
// Doubleclick an empty paragraph returns a node size of 2.
|
// Doubleclick an empty paragraph returns a node size of 2.
|
||||||
// So we check also for an empty text size.
|
// So we check also for an empty text size.
|
||||||
if (empty || !$anchor.parent.textContent) {
|
const isEmptyTextBlock = !doc.textBetween(from, to).length
|
||||||
|
&& isTextSelection(view.state.selection)
|
||||||
|
|
||||||
|
if (empty || isEmptyTextBlock) {
|
||||||
this.hide()
|
this.hide()
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -131,6 +144,7 @@ export class BubbleMenuView {
|
|||||||
destroy() {
|
destroy() {
|
||||||
this.tippy.destroy()
|
this.tippy.destroy()
|
||||||
this.element.removeEventListener('mousedown', this.mousedownHandler)
|
this.element.removeEventListener('mousedown', this.mousedownHandler)
|
||||||
|
this.view.dom.removeEventListener('dragstart', this.dragstartHandler)
|
||||||
this.editor.off('focus', this.focusHandler)
|
this.editor.off('focus', this.focusHandler)
|
||||||
this.editor.off('blur', this.blurHandler)
|
this.editor.off('blur', this.blurHandler)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.30](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-code-block-lowlight@2.0.0-beta.29...@tiptap/extension-code-block-lowlight@2.0.0-beta.30) (2021-06-17)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-code-block-lowlight
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.29](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-code-block-lowlight@2.0.0-beta.28...@tiptap/extension-code-block-lowlight@2.0.0-beta.29) (2021-06-07)
|
# [2.0.0-beta.29](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-code-block-lowlight@2.0.0-beta.28...@tiptap/extension-code-block-lowlight@2.0.0-beta.29) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/extension-code-block-lowlight
|
**Note:** Version bump only for package @tiptap/extension-code-block-lowlight
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-code-block-lowlight",
|
"name": "@tiptap/extension-code-block-lowlight",
|
||||||
"description": "code block extension for tiptap",
|
"description": "code block extension for tiptap",
|
||||||
"version": "2.0.0-beta.29",
|
"version": "2.0.0-beta.30",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"@tiptap/extension-code-block": "^2.0.0-beta.16",
|
"@tiptap/extension-code-block": "^2.0.0-beta.16",
|
||||||
"@types/lowlight": "^0.0.2",
|
"@types/lowlight": "^0.0.2",
|
||||||
"lowlight": "^1.20.0",
|
"lowlight": "^1.20.0",
|
||||||
"prosemirror-model": "^1.14.1",
|
"prosemirror-model": "^1.14.2",
|
||||||
"prosemirror-state": "^1.3.4",
|
"prosemirror-state": "^1.3.4",
|
||||||
"prosemirror-view": "^1.18.7"
|
"prosemirror-view": "^1.18.7"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,22 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.16](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-dropcursor@2.0.0-beta.15...@tiptap/extension-dropcursor@2.0.0-beta.16) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-dropcursor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.15](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-dropcursor@2.0.0-beta.14...@tiptap/extension-dropcursor@2.0.0-beta.15) (2021-06-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-dropcursor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.14](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-dropcursor@2.0.0-beta.13...@tiptap/extension-dropcursor@2.0.0-beta.14) (2021-05-27)
|
# [2.0.0-beta.14](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-dropcursor@2.0.0-beta.13...@tiptap/extension-dropcursor@2.0.0-beta.14) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/extension-dropcursor
|
**Note:** Version bump only for package @tiptap/extension-dropcursor
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-dropcursor",
|
"name": "@tiptap/extension-dropcursor",
|
||||||
"description": "dropcursor extension for tiptap",
|
"description": "dropcursor extension for tiptap",
|
||||||
"version": "2.0.0-beta.14",
|
"version": "2.0.0-beta.16",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const Dropcursor = Extension.create<DropcursorOptions>({
|
|||||||
name: 'dropCursor',
|
name: 'dropCursor',
|
||||||
|
|
||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
color: 'black',
|
color: 'currentColor',
|
||||||
width: 1,
|
width: 1,
|
||||||
class: null,
|
class: null,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.17](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.16...@tiptap/extension-floating-menu@2.0.0-beta.17) (2021-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-floating-menu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.16](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.15...@tiptap/extension-floating-menu@2.0.0-beta.16) (2021-05-27)
|
# [2.0.0-beta.16](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.15...@tiptap/extension-floating-menu@2.0.0-beta.16) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/extension-floating-menu
|
**Note:** Version bump only for package @tiptap/extension-floating-menu
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-floating-menu",
|
"name": "@tiptap/extension-floating-menu",
|
||||||
"description": "floating-menu extension for tiptap",
|
"description": "floating-menu extension for tiptap",
|
||||||
"version": "2.0.0-beta.16",
|
"version": "2.0.0-beta.17",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
|
|||||||
@@ -3,6 +3,37 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.60](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-mention@2.0.0-beta.59...@tiptap/extension-mention@2.0.0-beta.60) (2021-06-17)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-mention
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.59](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-mention@2.0.0-beta.58...@tiptap/extension-mention@2.0.0-beta.59) (2021-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Fix parsing of mention nodes ([#1471](https://github.com/ueberdosis/tiptap/issues/1471)) ([5178172](https://github.com/ueberdosis/tiptap/commit/5178172864e167538698186d56e0aa75df307c98))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.58](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-mention@2.0.0-beta.57...@tiptap/extension-mention@2.0.0-beta.58) (2021-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add label attribute to mention extension ([#1322](https://github.com/ueberdosis/tiptap/issues/1322)) ([c3afe88](https://github.com/ueberdosis/tiptap/commit/c3afe880ae56e53da429590be4c7e2ffe5a70486))
|
||||||
|
* add renderLabel option to mention extension, see [#1322](https://github.com/ueberdosis/tiptap/issues/1322) ([3b78af4](https://github.com/ueberdosis/tiptap/commit/3b78af44a054fa5d0101d8f7d836409b0b68547e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.57](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-mention@2.0.0-beta.56...@tiptap/extension-mention@2.0.0-beta.57) (2021-05-27)
|
# [2.0.0-beta.57](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-mention@2.0.0-beta.56...@tiptap/extension-mention@2.0.0-beta.57) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/extension-mention
|
**Note:** Version bump only for package @tiptap/extension-mention
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-mention",
|
"name": "@tiptap/extension-mention",
|
||||||
"description": "mention extension for tiptap",
|
"description": "mention extension for tiptap",
|
||||||
"version": "2.0.0-beta.57",
|
"version": "2.0.0-beta.60",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -24,6 +24,6 @@
|
|||||||
"@tiptap/core": "^2.0.0-beta.1"
|
"@tiptap/core": "^2.0.0-beta.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tiptap/suggestion": "^2.0.0-beta.57"
|
"@tiptap/suggestion": "^2.0.0-beta.58"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
import { Node, mergeAttributes } from '@tiptap/core'
|
import { Node, mergeAttributes } from '@tiptap/core'
|
||||||
|
import { Node as ProseMirrorNode } from 'prosemirror-model'
|
||||||
import Suggestion, { SuggestionOptions } from '@tiptap/suggestion'
|
import Suggestion, { SuggestionOptions } from '@tiptap/suggestion'
|
||||||
|
|
||||||
export type MentionOptions = {
|
export type MentionOptions = {
|
||||||
HTMLAttributes: Record<string, any>,
|
HTMLAttributes: Record<string, any>,
|
||||||
|
renderLabel: (props: {
|
||||||
|
options: MentionOptions,
|
||||||
|
node: ProseMirrorNode,
|
||||||
|
}) => string,
|
||||||
suggestion: Omit<SuggestionOptions, 'editor'>,
|
suggestion: Omit<SuggestionOptions, 'editor'>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11,6 +16,9 @@ export const Mention = Node.create<MentionOptions>({
|
|||||||
|
|
||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
HTMLAttributes: {},
|
HTMLAttributes: {},
|
||||||
|
renderLabel({ options, node }) {
|
||||||
|
return `${options.suggestion.char}${node.attrs.label ?? node.attrs.id}`
|
||||||
|
},
|
||||||
suggestion: {
|
suggestion: {
|
||||||
char: '@',
|
char: '@',
|
||||||
command: ({ editor, range, props }) => {
|
command: ({ editor, range, props }) => {
|
||||||
@@ -49,7 +57,7 @@ export const Mention = Node.create<MentionOptions>({
|
|||||||
default: null,
|
default: null,
|
||||||
parseHTML: element => {
|
parseHTML: element => {
|
||||||
return {
|
return {
|
||||||
id: element.getAttribute('data-mention'),
|
id: element.getAttribute('data-id'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
renderHTML: attributes => {
|
renderHTML: attributes => {
|
||||||
@@ -58,7 +66,25 @@ export const Mention = Node.create<MentionOptions>({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'data-mention': attributes.id,
|
'data-id': attributes.id,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
label: {
|
||||||
|
default: null,
|
||||||
|
parseHTML: element => {
|
||||||
|
return {
|
||||||
|
label: element.getAttribute('data-label'),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
renderHTML: attributes => {
|
||||||
|
if (!attributes.label) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
'data-label': attributes.label,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -76,13 +102,19 @@ export const Mention = Node.create<MentionOptions>({
|
|||||||
renderHTML({ node, HTMLAttributes }) {
|
renderHTML({ node, HTMLAttributes }) {
|
||||||
return [
|
return [
|
||||||
'span',
|
'span',
|
||||||
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
|
mergeAttributes({ 'data-mention': '' }, this.options.HTMLAttributes, HTMLAttributes),
|
||||||
`${this.options.suggestion.char}${node.attrs.id}`,
|
this.options.renderLabel({
|
||||||
|
options: this.options,
|
||||||
|
node,
|
||||||
|
}),
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
renderText({ node }) {
|
renderText({ node }) {
|
||||||
return `${this.options.suggestion.char}${node.attrs.id}`
|
return this.options.renderLabel({
|
||||||
|
options: this.options,
|
||||||
|
node,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
addKeyboardShortcuts() {
|
addKeyboardShortcuts() {
|
||||||
|
|||||||
@@ -3,6 +3,33 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.24](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-placeholder@2.0.0-beta.23...@tiptap/extension-placeholder@2.0.0-beta.24) (2021-06-17)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-placeholder
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.23](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-placeholder@2.0.0-beta.22...@tiptap/extension-placeholder@2.0.0-beta.23) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-placeholder
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.22](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-placeholder@2.0.0-beta.21...@tiptap/extension-placeholder@2.0.0-beta.22) (2021-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* don’t show placeholder if node contains only atom nodes, fix [#1457](https://github.com/ueberdosis/tiptap/issues/1457) ([11b4866](https://github.com/ueberdosis/tiptap/commit/11b48669482db5122bcd60dc1b65f839e77e5a48))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-placeholder@2.0.0-beta.20...@tiptap/extension-placeholder@2.0.0-beta.21) (2021-05-28)
|
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-placeholder@2.0.0-beta.20...@tiptap/extension-placeholder@2.0.0-beta.21) (2021-05-28)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/extension-placeholder
|
**Note:** Version bump only for package @tiptap/extension-placeholder
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-placeholder",
|
"name": "@tiptap/extension-placeholder",
|
||||||
"description": "placeholder extension for tiptap",
|
"description": "placeholder extension for tiptap",
|
||||||
"version": "2.0.0-beta.21",
|
"version": "2.0.0-beta.24",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"@tiptap/core": "^2.0.0-beta.1"
|
"@tiptap/core": "^2.0.0-beta.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"prosemirror-model": "^1.14.1",
|
"prosemirror-model": "^1.14.2",
|
||||||
"prosemirror-state": "^1.3.4",
|
"prosemirror-state": "^1.3.4",
|
||||||
"prosemirror-view": "^1.18.7"
|
"prosemirror-view": "^1.18.7"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export const Placeholder = Extension.create<PlaceholderOptions>({
|
|||||||
|
|
||||||
doc.descendants((node, pos) => {
|
doc.descendants((node, pos) => {
|
||||||
const hasAnchor = anchor >= pos && anchor <= (pos + node.nodeSize)
|
const hasAnchor = anchor >= pos && anchor <= (pos + node.nodeSize)
|
||||||
const isEmpty = !node.isLeaf && !node.textContent
|
const isEmpty = !node.isLeaf && !node.childCount
|
||||||
|
|
||||||
if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {
|
if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {
|
||||||
const classes = [this.options.emptyNodeClass]
|
const classes = [this.options.emptyNodeClass]
|
||||||
|
|||||||
19
packages/extension-subscript/CHANGELOG.md
Normal file
19
packages/extension-subscript/CHANGELOG.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Change Log
|
||||||
|
|
||||||
|
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.3](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-subscript@2.0.0-beta.2...@tiptap/extension-subscript@2.0.0-beta.3) (2021-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* revert excluding superscript from subscript, and vice versa to prevent error if not both extensions are used ([123f206](https://github.com/ueberdosis/tiptap/commit/123f2067e5ccc15f1fceee164e8bc461193cf8a0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 2.0.0-beta.2 (2021-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-subscript
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-subscript",
|
"name": "@tiptap/extension-subscript",
|
||||||
"description": "subscript extension for tiptap",
|
"description": "subscript extension for tiptap",
|
||||||
"version": "2.0.0-beta.1",
|
"version": "2.0.0-beta.3",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
import { Command, Mark, mergeAttributes } from '@tiptap/core'
|
import { Mark, mergeAttributes } from '@tiptap/core'
|
||||||
|
|
||||||
export interface SubscriptExtensionOptions {
|
export interface SubscriptExtensionOptions {
|
||||||
HTMLAttributes: Object,
|
HTMLAttributes: Object,
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface Commands {
|
interface Commands<ReturnType> {
|
||||||
subscript: {
|
subscript: {
|
||||||
/**
|
/**
|
||||||
* Set a subscript mark
|
* Set a subscript mark
|
||||||
*/
|
*/
|
||||||
setSubscript: () => Command,
|
setSubscript: () => ReturnType,
|
||||||
/**
|
/**
|
||||||
* Toggle a subscript mark
|
* Toggle a subscript mark
|
||||||
*/
|
*/
|
||||||
toggleSubscript: () => Command,
|
toggleSubscript: () => ReturnType,
|
||||||
/**
|
/**
|
||||||
* Unset a subscript mark
|
* Unset a subscript mark
|
||||||
*/
|
*/
|
||||||
unsetSubscript: () => Command,
|
unsetSubscript: () => ReturnType,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,4 +66,10 @@ export const Subscript = Mark.create<SubscriptExtensionOptions>({
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addKeyboardShortcuts() {
|
||||||
|
return {
|
||||||
|
'Mod-,': () => this.editor.commands.toggleSubscript(),
|
||||||
|
}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
19
packages/extension-superscript/CHANGELOG.md
Normal file
19
packages/extension-superscript/CHANGELOG.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Change Log
|
||||||
|
|
||||||
|
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.3](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-superscript@2.0.0-beta.2...@tiptap/extension-superscript@2.0.0-beta.3) (2021-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* revert excluding superscript from subscript, and vice versa to prevent error if not both extensions are used ([123f206](https://github.com/ueberdosis/tiptap/commit/123f2067e5ccc15f1fceee164e8bc461193cf8a0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 2.0.0-beta.2 (2021-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-superscript
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-superscript",
|
"name": "@tiptap/extension-superscript",
|
||||||
"description": "superscript extension for tiptap",
|
"description": "superscript extension for tiptap",
|
||||||
"version": "2.0.0-beta.1",
|
"version": "2.0.0-beta.3",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
import { Command, Mark, mergeAttributes } from '@tiptap/core'
|
import { Mark, mergeAttributes } from '@tiptap/core'
|
||||||
|
|
||||||
export interface SuperscriptExtensionOptions {
|
export interface SuperscriptExtensionOptions {
|
||||||
HTMLAttributes: Object,
|
HTMLAttributes: Object,
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tiptap/core' {
|
declare module '@tiptap/core' {
|
||||||
interface Commands {
|
interface Commands<ReturnType> {
|
||||||
superscript: {
|
superscript: {
|
||||||
/**
|
/**
|
||||||
* Set a superscript mark
|
* Set a superscript mark
|
||||||
*/
|
*/
|
||||||
setSuperscript: () => Command,
|
setSuperscript: () => ReturnType,
|
||||||
/**
|
/**
|
||||||
* Toggle a superscript mark
|
* Toggle a superscript mark
|
||||||
*/
|
*/
|
||||||
toggleSuperscript: () => Command,
|
toggleSuperscript: () => ReturnType,
|
||||||
/**
|
/**
|
||||||
* Unset a superscript mark
|
* Unset a superscript mark
|
||||||
*/
|
*/
|
||||||
unsetSuperscript: () => Command,
|
unsetSuperscript: () => ReturnType,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,4 +66,10 @@ export const Superscript = Mark.create<SuperscriptExtensionOptions>({
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
addKeyboardShortcuts() {
|
||||||
|
return {
|
||||||
|
'Mod-.': () => this.editor.commands.toggleSuperscript(),
|
||||||
|
}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,6 +3,28 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-align@2.0.0-beta.19...@tiptap/extension-text-align@2.0.0-beta.20) (2021-06-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove default types for textAlign extension, fix [#1430](https://github.com/ueberdosis/tiptap/issues/1430) ([b4e41af](https://github.com/ueberdosis/tiptap/commit/b4e41afd1798e7eba4ccb0804be1ed2473c1f4d2))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.19](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-align@2.0.0-beta.18...@tiptap/extension-text-align@2.0.0-beta.19) (2021-06-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fix a bug where setting text align isn’t working when heading extension is not added ([ddb9a4b](https://github.com/ueberdosis/tiptap/commit/ddb9a4bf186b766477f21102dae6eb1299ea425a))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.18](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-align@2.0.0-beta.17...@tiptap/extension-text-align@2.0.0-beta.18) (2021-06-07)
|
# [2.0.0-beta.18](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-align@2.0.0-beta.17...@tiptap/extension-text-align@2.0.0-beta.18) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/extension-text-align
|
**Note:** Version bump only for package @tiptap/extension-text-align
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-text-align",
|
"name": "@tiptap/extension-text-align",
|
||||||
"description": "text align extension for tiptap",
|
"description": "text align extension for tiptap",
|
||||||
"version": "2.0.0-beta.18",
|
"version": "2.0.0-beta.20",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const TextAlign = Extension.create<TextAlignOptions>({
|
|||||||
name: 'textAlign',
|
name: 'textAlign',
|
||||||
|
|
||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
types: ['heading', 'paragraph'],
|
types: [],
|
||||||
alignments: ['left', 'center', 'right', 'justify'],
|
alignments: ['left', 'center', 'right', 'justify'],
|
||||||
defaultAlignment: 'left',
|
defaultAlignment: 'left',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,25 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.16](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-style@2.0.0-beta.15...@tiptap/extension-text-style@2.0.0-beta.16) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/extension-text-style
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.15](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-style@2.0.0-beta.14...@tiptap/extension-text-style@2.0.0-beta.15) (2021-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Fix removal of textStyle mark when any style resets ([#1465](https://github.com/ueberdosis/tiptap/issues/1465)) ([fbf4422](https://github.com/ueberdosis/tiptap/commit/fbf442269d021bbe17a9c0a830edfeda00bac85a))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.14](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-style@2.0.0-beta.13...@tiptap/extension-text-style@2.0.0-beta.14) (2021-06-07)
|
# [2.0.0-beta.14](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-style@2.0.0-beta.13...@tiptap/extension-text-style@2.0.0-beta.14) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/extension-text-style
|
**Note:** Version bump only for package @tiptap/extension-text-style
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/extension-text-style",
|
"name": "@tiptap/extension-text-style",
|
||||||
"description": "text style extension for tiptap",
|
"description": "text style extension for tiptap",
|
||||||
"version": "2.0.0-beta.14",
|
"version": "2.0.0-beta.16",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const TextStyle = Mark.create<TextStyleOptions>({
|
|||||||
return {
|
return {
|
||||||
removeEmptyTextStyle: () => ({ state, commands }) => {
|
removeEmptyTextStyle: () => ({ state, commands }) => {
|
||||||
const attributes = getMarkAttributes(state, this.type)
|
const attributes = getMarkAttributes(state, this.type)
|
||||||
const hasStyles = Object.entries(attributes).every(([, value]) => !!value)
|
const hasStyles = Object.entries(attributes).some(([, value]) => !!value)
|
||||||
|
|
||||||
if (hasStyles) {
|
if (hasStyles) {
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -3,6 +3,33 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.83](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.82...@tiptap/html@2.0.0-beta.83) (2021-06-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* improve types for generateHTML ([502b5b1](https://github.com/ueberdosis/tiptap/commit/502b5b1cc9f1a8beb49ef2da81a9db56c7e92424))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.82](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.81...@tiptap/html@2.0.0-beta.82) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.81](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.80...@tiptap/html@2.0.0-beta.81) (2021-06-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.80](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.79...@tiptap/html@2.0.0-beta.80) (2021-06-07)
|
# [2.0.0-beta.80](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.79...@tiptap/html@2.0.0-beta.80) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/html
|
**Note:** Version bump only for package @tiptap/html
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/html",
|
"name": "@tiptap/html",
|
||||||
"description": "utility package to render tiptap JSON as HTML",
|
"description": "utility package to render tiptap JSON as HTML",
|
||||||
"version": "2.0.0-beta.80",
|
"version": "2.0.0-beta.83",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tiptap/core": "^2.0.0-beta.81",
|
"@tiptap/core": "^2.0.0-beta.84",
|
||||||
"hostic-dom": "^0.8.6",
|
"hostic-dom": "^0.8.6",
|
||||||
"prosemirror-model": "^1.14.1"
|
"prosemirror-model": "^1.14.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Extensions, getSchema } from '@tiptap/core'
|
import { Extensions, getSchema, JSONContent } from '@tiptap/core'
|
||||||
import { Node } from 'prosemirror-model'
|
import { Node } from 'prosemirror-model'
|
||||||
import getHTMLFromFragment from './getHTMLFromFragment'
|
import getHTMLFromFragment from './getHTMLFromFragment'
|
||||||
|
|
||||||
export default function generateHTML(doc: object, extensions: Extensions): string {
|
export default function generateHTML(doc: JSONContent, extensions: Extensions): string {
|
||||||
const schema = getSchema(extensions)
|
const schema = getSchema(extensions)
|
||||||
const contentNode = Node.fromJSON(schema, doc)
|
const contentNode = Node.fromJSON(schema, doc)
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,46 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.50](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.49...@tiptap/react@2.0.0-beta.50) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/react
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.49](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.48...@tiptap/react@2.0.0-beta.49) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/react
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.48](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.47...@tiptap/react@2.0.0-beta.48) (2021-06-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/react
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.47](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.46...@tiptap/react@2.0.0-beta.47) (2021-06-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/react
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.46](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.45...@tiptap/react@2.0.0-beta.46) (2021-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/react
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.45](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.44...@tiptap/react@2.0.0-beta.45) (2021-05-29)
|
# [2.0.0-beta.45](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.44...@tiptap/react@2.0.0-beta.45) (2021-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/react",
|
"name": "@tiptap/react",
|
||||||
"description": "React components for tiptap",
|
"description": "React components for tiptap",
|
||||||
"version": "2.0.0-beta.45",
|
"version": "2.0.0-beta.50",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -26,12 +26,12 @@
|
|||||||
"react-dom": "^17.0.1"
|
"react-dom": "^17.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tiptap/extension-bubble-menu": "^2.0.0-beta.20",
|
"@tiptap/extension-bubble-menu": "^2.0.0-beta.23",
|
||||||
"@tiptap/extension-floating-menu": "^2.0.0-beta.16",
|
"@tiptap/extension-floating-menu": "^2.0.0-beta.17",
|
||||||
"prosemirror-view": "^1.18.7"
|
"prosemirror-view": "^1.18.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react": "^17.0.8",
|
"@types/react": "^17.0.11",
|
||||||
"@types/react-dom": "^17.0.5"
|
"@types/react-dom": "^17.0.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ export interface NodeViewContentProps {
|
|||||||
as?: React.ElementType,
|
as?: React.ElementType,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const NodeViewContent: React.FC<NodeViewContentProps> = props => {
|
export const NodeViewContent: React.FC<NodeViewContentProps> = React.forwardRef((props, ref) => {
|
||||||
const Tag = props.as || 'div'
|
const Tag = props.as || 'div'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
{...props}
|
{...props}
|
||||||
|
ref={ref}
|
||||||
data-node-view-content=""
|
data-node-view-content=""
|
||||||
style={{
|
style={{
|
||||||
...props.style,
|
...props.style,
|
||||||
@@ -18,4 +19,4 @@ export const NodeViewContent: React.FC<NodeViewContentProps> = props => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
})
|
||||||
|
|||||||
@@ -6,13 +6,14 @@ export interface NodeViewWrapperProps {
|
|||||||
as?: React.ElementType,
|
as?: React.ElementType,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = props => {
|
export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = React.forwardRef((props, ref) => {
|
||||||
const { onDragStart } = useReactNodeView()
|
const { onDragStart } = useReactNodeView()
|
||||||
const Tag = props.as || 'div'
|
const Tag = props.as || 'div'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
{...props}
|
{...props}
|
||||||
|
ref={ref}
|
||||||
data-node-view-wrapper=""
|
data-node-view-wrapper=""
|
||||||
onDragStart={onDragStart}
|
onDragStart={onDragStart}
|
||||||
style={{
|
style={{
|
||||||
@@ -21,4 +22,4 @@ export const NodeViewWrapper: React.FC<NodeViewWrapperProps> = props => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
})
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.80](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.79...@tiptap/starter-kit@2.0.0-beta.80) (2021-06-17)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/starter-kit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.79](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.78...@tiptap/starter-kit@2.0.0-beta.79) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/starter-kit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.78](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.77...@tiptap/starter-kit@2.0.0-beta.78) (2021-06-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/starter-kit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.77](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.76...@tiptap/starter-kit@2.0.0-beta.77) (2021-06-07)
|
# [2.0.0-beta.77](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.76...@tiptap/starter-kit@2.0.0-beta.77) (2021-06-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/starter-kit
|
**Note:** Version bump only for package @tiptap/starter-kit
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/starter-kit",
|
"name": "@tiptap/starter-kit",
|
||||||
"description": "starter kit for tiptap",
|
"description": "starter kit for tiptap",
|
||||||
"version": "2.0.0-beta.77",
|
"version": "2.0.0-beta.80",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -21,14 +21,14 @@
|
|||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tiptap/core": "^2.0.0-beta.81",
|
"@tiptap/core": "^2.0.0-beta.84",
|
||||||
"@tiptap/extension-blockquote": "^2.0.0-beta.14",
|
"@tiptap/extension-blockquote": "^2.0.0-beta.14",
|
||||||
"@tiptap/extension-bold": "^2.0.0-beta.14",
|
"@tiptap/extension-bold": "^2.0.0-beta.14",
|
||||||
"@tiptap/extension-bullet-list": "^2.0.0-beta.14",
|
"@tiptap/extension-bullet-list": "^2.0.0-beta.14",
|
||||||
"@tiptap/extension-code": "^2.0.0-beta.14",
|
"@tiptap/extension-code": "^2.0.0-beta.14",
|
||||||
"@tiptap/extension-code-block": "^2.0.0-beta.16",
|
"@tiptap/extension-code-block": "^2.0.0-beta.16",
|
||||||
"@tiptap/extension-document": "^2.0.0-beta.12",
|
"@tiptap/extension-document": "^2.0.0-beta.12",
|
||||||
"@tiptap/extension-dropcursor": "^2.0.0-beta.14",
|
"@tiptap/extension-dropcursor": "^2.0.0-beta.16",
|
||||||
"@tiptap/extension-gapcursor": "^2.0.0-beta.17",
|
"@tiptap/extension-gapcursor": "^2.0.0-beta.17",
|
||||||
"@tiptap/extension-hard-break": "^2.0.0-beta.14",
|
"@tiptap/extension-hard-break": "^2.0.0-beta.14",
|
||||||
"@tiptap/extension-heading": "^2.0.0-beta.14",
|
"@tiptap/extension-heading": "^2.0.0-beta.14",
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.58](https://github.com/ueberdosis/tiptap/compare/@tiptap/suggestion@2.0.0-beta.57...@tiptap/suggestion@2.0.0-beta.58) (2021-06-17)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/suggestion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.57](https://github.com/ueberdosis/tiptap/compare/@tiptap/suggestion@2.0.0-beta.56...@tiptap/suggestion@2.0.0-beta.57) (2021-05-27)
|
# [2.0.0-beta.57](https://github.com/ueberdosis/tiptap/compare/@tiptap/suggestion@2.0.0-beta.56...@tiptap/suggestion@2.0.0-beta.57) (2021-05-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @tiptap/suggestion
|
**Note:** Version bump only for package @tiptap/suggestion
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/suggestion",
|
"name": "@tiptap/suggestion",
|
||||||
"description": "suggestion plugin for tiptap",
|
"description": "suggestion plugin for tiptap",
|
||||||
"version": "2.0.0-beta.57",
|
"version": "2.0.0-beta.58",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"@tiptap/core": "^2.0.0-beta.1"
|
"@tiptap/core": "^2.0.0-beta.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"prosemirror-model": "^1.14.1",
|
"prosemirror-model": "^1.14.2",
|
||||||
"prosemirror-state": "^1.3.4",
|
"prosemirror-state": "^1.3.4",
|
||||||
"prosemirror-view": "^1.18.7"
|
"prosemirror-view": "^1.18.7"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,38 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.38](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.37...@tiptap/vue-2@2.0.0-beta.38) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/vue-2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.37](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.36...@tiptap/vue-2@2.0.0-beta.37) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/vue-2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.36](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.35...@tiptap/vue-2@2.0.0-beta.36) (2021-06-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/vue-2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.35](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.34...@tiptap/vue-2@2.0.0-beta.35) (2021-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/vue-2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.34](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.33...@tiptap/vue-2@2.0.0-beta.34) (2021-05-28)
|
# [2.0.0-beta.34](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.33...@tiptap/vue-2@2.0.0-beta.34) (2021-05-28)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/vue-2",
|
"name": "@tiptap/vue-2",
|
||||||
"description": "Vue components for tiptap",
|
"description": "Vue components for tiptap",
|
||||||
"version": "2.0.0-beta.34",
|
"version": "2.0.0-beta.38",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
"vue": "^2.6.12"
|
"vue": "^2.6.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tiptap/extension-bubble-menu": "^2.0.0-beta.20",
|
"@tiptap/extension-bubble-menu": "^2.0.0-beta.23",
|
||||||
"@tiptap/extension-floating-menu": "^2.0.0-beta.16",
|
"@tiptap/extension-floating-menu": "^2.0.0-beta.17",
|
||||||
"prosemirror-view": "^1.18.7"
|
"prosemirror-view": "^1.18.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,38 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.44](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.43...@tiptap/vue-3@2.0.0-beta.44) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/vue-3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.43](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.42...@tiptap/vue-3@2.0.0-beta.43) (2021-06-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/vue-3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.42](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.41...@tiptap/vue-3@2.0.0-beta.42) (2021-06-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/vue-3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.41](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.40...@tiptap/vue-3@2.0.0-beta.41) (2021-06-09)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @tiptap/vue-3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.40](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.39...@tiptap/vue-3@2.0.0-beta.40) (2021-05-28)
|
# [2.0.0-beta.40](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.39...@tiptap/vue-3@2.0.0-beta.40) (2021-05-28)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@tiptap/vue-3",
|
"name": "@tiptap/vue-3",
|
||||||
"description": "Vue components for tiptap",
|
"description": "Vue components for tiptap",
|
||||||
"version": "2.0.0-beta.40",
|
"version": "2.0.0-beta.44",
|
||||||
"homepage": "https://tiptap.dev",
|
"homepage": "https://tiptap.dev",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tiptap",
|
"tiptap",
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
"@tiptap/core": "^2.0.0-beta.1"
|
"@tiptap/core": "^2.0.0-beta.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tiptap/extension-bubble-menu": "^2.0.0-beta.20",
|
"@tiptap/extension-bubble-menu": "^2.0.0-beta.23",
|
||||||
"@tiptap/extension-floating-menu": "^2.0.0-beta.16",
|
"@tiptap/extension-floating-menu": "^2.0.0-beta.17",
|
||||||
"prosemirror-state": "^1.3.4",
|
"prosemirror-state": "^1.3.4",
|
||||||
"prosemirror-view": "^1.18.7",
|
"prosemirror-view": "^1.18.7",
|
||||||
"vue": "^3.0.0"
|
"vue": "^3.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user