Merge branch 'main' of github.com:ueberdosis/tiptap
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
<div class="export">
|
||||
<h3>JSON</h3>
|
||||
<pre><code v-html="json" /></pre>
|
||||
<pre><code>{{ json }}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.0.0-beta.114](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.113...@tiptap/core@2.0.0-beta.114) (2021-09-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* getHTMLFromFragment now expects a fragment instead of node ([2c9cf03](https://github.com/ueberdosis/tiptap/commit/2c9cf03398e2b14fceaec4386fdb53cae5261ae7))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.113](https://github.com/ueberdosis/tiptap/compare/@tiptap/core@2.0.0-beta.112...@tiptap/core@2.0.0-beta.113) (2021-09-27)
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/core",
|
||||
"description": "headless rich text editor",
|
||||
"version": "2.0.0-beta.113",
|
||||
"version": "2.0.0-beta.114",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -397,7 +397,7 @@ export class Editor extends EventEmitter {
|
||||
* Get the document as HTML.
|
||||
*/
|
||||
public getHTML(): string {
|
||||
return getHTMLFromFragment(this.state.doc, this.schema)
|
||||
return getHTMLFromFragment(this.state.doc.content, this.schema)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,5 +7,5 @@ export default function generateHTML(doc: JSONContent, extensions: Extensions):
|
||||
const schema = getSchema(extensions)
|
||||
const contentNode = Node.fromJSON(schema, doc)
|
||||
|
||||
return getHTMLFromFragment(contentNode, schema)
|
||||
return getHTMLFromFragment(contentNode.content, schema)
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Node, DOMSerializer, Schema } from 'prosemirror-model'
|
||||
import { DOMSerializer, Schema, Fragment } from 'prosemirror-model'
|
||||
|
||||
export default function getHTMLFromFragment(doc: Node, schema: Schema): string {
|
||||
const fragment = DOMSerializer
|
||||
export default function getHTMLFromFragment(fragment: Fragment, schema: Schema): string {
|
||||
const documentFragment = DOMSerializer
|
||||
.fromSchema(schema)
|
||||
.serializeFragment(doc.content)
|
||||
.serializeFragment(fragment)
|
||||
|
||||
const temporaryDocument = document.implementation.createHTMLDocument()
|
||||
const container = temporaryDocument.createElement('div')
|
||||
container.appendChild(fragment)
|
||||
container.appendChild(documentFragment)
|
||||
|
||||
return container.innerHTML
|
||||
}
|
||||
|
||||
@@ -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.37](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.36...@tiptap/extension-bubble-menu@2.0.0-beta.37) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-bubble-menu
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.36](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-bubble-menu@2.0.0-beta.35...@tiptap/extension-bubble-menu@2.0.0-beta.36) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-bubble-menu
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/extension-bubble-menu",
|
||||
"description": "bubble-menu extension for tiptap",
|
||||
"version": "2.0.0-beta.36",
|
||||
"version": "2.0.0-beta.37",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -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.31](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.30...@tiptap/extension-floating-menu@2.0.0-beta.31) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-floating-menu
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.30](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-floating-menu@2.0.0-beta.29...@tiptap/extension-floating-menu@2.0.0-beta.30) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-floating-menu
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/extension-floating-menu",
|
||||
"description": "floating-menu extension for tiptap",
|
||||
"version": "2.0.0-beta.30",
|
||||
"version": "2.0.0-beta.31",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -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.22](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-gapcursor@2.0.0-beta.21...@tiptap/extension-gapcursor@2.0.0-beta.22) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-gapcursor
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-gapcursor@2.0.0-beta.20...@tiptap/extension-gapcursor@2.0.0-beta.21) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-gapcursor
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/extension-gapcursor",
|
||||
"description": "gapcursor extension for tiptap",
|
||||
"version": "2.0.0-beta.21",
|
||||
"version": "2.0.0-beta.22",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -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.19](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.18...@tiptap/extension-hard-break@2.0.0-beta.19) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-hard-break
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.18](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-hard-break@2.0.0-beta.17...@tiptap/extension-hard-break@2.0.0-beta.18) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-hard-break
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/extension-hard-break",
|
||||
"description": "hard break extension for tiptap",
|
||||
"version": "2.0.0-beta.18",
|
||||
"version": "2.0.0-beta.19",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -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.19](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-highlight@2.0.0-beta.18...@tiptap/extension-highlight@2.0.0-beta.19) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-highlight
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.18](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-highlight@2.0.0-beta.17...@tiptap/extension-highlight@2.0.0-beta.18) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/extension-highlight
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/extension-highlight",
|
||||
"description": "highlight extension for tiptap",
|
||||
"version": "2.0.0-beta.18",
|
||||
"version": "2.0.0-beta.19",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -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.113](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.112...@tiptap/html@2.0.0-beta.113) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.112](https://github.com/ueberdosis/tiptap/compare/@tiptap/html@2.0.0-beta.111...@tiptap/html@2.0.0-beta.112) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/html
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/html",
|
||||
"description": "utility package to render tiptap JSON as HTML",
|
||||
"version": "2.0.0-beta.112",
|
||||
"version": "2.0.0-beta.113",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
@@ -21,7 +21,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tiptap/core": "^2.0.0-beta.113",
|
||||
"@tiptap/core": "^2.0.0-beta.114",
|
||||
"hostic-dom": "^0.8.7",
|
||||
"prosemirror-model": "^1.14.3"
|
||||
},
|
||||
|
||||
@@ -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.74](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.73...@tiptap/react@2.0.0-beta.74) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/react
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.73](https://github.com/ueberdosis/tiptap/compare/@tiptap/react@2.0.0-beta.72...@tiptap/react@2.0.0-beta.73) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/react
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/react",
|
||||
"description": "React components for tiptap",
|
||||
"version": "2.0.0-beta.73",
|
||||
"version": "2.0.0-beta.74",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
@@ -32,8 +32,8 @@
|
||||
"react-dom": "^17.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tiptap/extension-bubble-menu": "^2.0.0-beta.36",
|
||||
"@tiptap/extension-floating-menu": "^2.0.0-beta.30",
|
||||
"@tiptap/extension-bubble-menu": "^2.0.0-beta.37",
|
||||
"@tiptap/extension-floating-menu": "^2.0.0-beta.31",
|
||||
"prosemirror-view": "^1.20.1"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
@@ -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.113](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.112...@tiptap/starter-kit@2.0.0-beta.113) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/starter-kit
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.112](https://github.com/ueberdosis/tiptap/compare/@tiptap/starter-kit@2.0.0-beta.111...@tiptap/starter-kit@2.0.0-beta.112) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/starter-kit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/starter-kit",
|
||||
"description": "starter kit for tiptap",
|
||||
"version": "2.0.0-beta.112",
|
||||
"version": "2.0.0-beta.113",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
@@ -21,7 +21,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tiptap/core": "^2.0.0-beta.113",
|
||||
"@tiptap/core": "^2.0.0-beta.114",
|
||||
"@tiptap/extension-blockquote": "^2.0.0-beta.15",
|
||||
"@tiptap/extension-bold": "^2.0.0-beta.15",
|
||||
"@tiptap/extension-bullet-list": "^2.0.0-beta.15",
|
||||
@@ -29,8 +29,8 @@
|
||||
"@tiptap/extension-code-block": "^2.0.0-beta.18",
|
||||
"@tiptap/extension-document": "^2.0.0-beta.13",
|
||||
"@tiptap/extension-dropcursor": "^2.0.0-beta.19",
|
||||
"@tiptap/extension-gapcursor": "^2.0.0-beta.21",
|
||||
"@tiptap/extension-hard-break": "^2.0.0-beta.18",
|
||||
"@tiptap/extension-gapcursor": "^2.0.0-beta.22",
|
||||
"@tiptap/extension-hard-break": "^2.0.0-beta.19",
|
||||
"@tiptap/extension-heading": "^2.0.0-beta.15",
|
||||
"@tiptap/extension-history": "^2.0.0-beta.16",
|
||||
"@tiptap/extension-horizontal-rule": "^2.0.0-beta.19",
|
||||
|
||||
@@ -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.55](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.54...@tiptap/vue-2@2.0.0-beta.55) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/vue-2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.54](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-2@2.0.0-beta.53...@tiptap/vue-2@2.0.0-beta.54) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/vue-2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/vue-2",
|
||||
"description": "Vue components for tiptap",
|
||||
"version": "2.0.0-beta.54",
|
||||
"version": "2.0.0-beta.55",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
@@ -28,8 +28,8 @@
|
||||
"vue": "^2.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tiptap/extension-bubble-menu": "^2.0.0-beta.36",
|
||||
"@tiptap/extension-floating-menu": "^2.0.0-beta.30",
|
||||
"@tiptap/extension-bubble-menu": "^2.0.0-beta.37",
|
||||
"@tiptap/extension-floating-menu": "^2.0.0-beta.31",
|
||||
"prosemirror-view": "^1.20.1"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
@@ -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.65](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.64...@tiptap/vue-3@2.0.0-beta.65) (2021-09-28)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/vue-3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.64](https://github.com/ueberdosis/tiptap/compare/@tiptap/vue-3@2.0.0-beta.63...@tiptap/vue-3@2.0.0-beta.64) (2021-09-27)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/vue-3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tiptap/vue-3",
|
||||
"description": "Vue components for tiptap",
|
||||
"version": "2.0.0-beta.64",
|
||||
"version": "2.0.0-beta.65",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
@@ -28,8 +28,8 @@
|
||||
"vue": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tiptap/extension-bubble-menu": "^2.0.0-beta.36",
|
||||
"@tiptap/extension-floating-menu": "^2.0.0-beta.30",
|
||||
"@tiptap/extension-bubble-menu": "^2.0.0-beta.37",
|
||||
"@tiptap/extension-floating-menu": "^2.0.0-beta.31",
|
||||
"prosemirror-state": "^1.3.4",
|
||||
"prosemirror-view": "^1.20.1"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user