Merge branch 'master' into async-suggestions

This commit is contained in:
Philipp Kühn 2020-08-07 14:23:08 +02:00 committed by GitHub
commit 057e43ccc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 183 additions and 20694 deletions

View File

@ -1,8 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
url: https://github.com/ueberdosis/tiptap/issues/new
title: ''
labels: 'bug'
labels: bug
assignees: ''
---
@ -12,9 +13,9 @@ A clear and concise description of what the bug is.
**Steps to Reproduce / Codesandbox Example**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
1. Go to ''
2. Click on ''
3. Scroll down to ''
4. See error
Fork this or create a new Codesandbox replicating your error

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a Question
url: https://github.com/ueberdosis/tiptap/discussions/new
about: Ask the community for help

View File

@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'feature request'
labels: feature request
assignees: ''
---

55
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,55 @@
name: ci
on: [push, pull_request]
jobs:
audit:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build:packages
- run: yarn audit-ci
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build:packages
- run: yarn lint
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn build:packages
- run: yarn test

10
.gitpod.yml Normal file
View File

@ -0,0 +1,10 @@
tasks:
- init: yarn install
command: yarn run start
ports:
- port: 3000
onOpen: open-preview
vscode:
extensions:
- octref.vetur@0.23.0:0z6KpEz8h/vAvy4pYRDg3Q==

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019, Scrumpy UG (limited liability)
Copyright (c) 2020, überdosis GbR
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,25 +1,33 @@
> This repository has been migrated to a new organization. Read more: https://github.com/ueberdosis/tiptap/issues/759
# tiptap
A renderless and extendable rich-text editor for [Vue.js](https://github.com/vuejs/vue)
[![](https://img.shields.io/npm/v/tiptap.svg?label=version)](https://www.npmjs.com/package/tiptap)
[![](https://img.shields.io/npm/dm/tiptap.svg)](https://npmcharts.com/compare/tiptap?minimal=true)
[![](https://img.shields.io/npm/l/tiptap.svg)](https://www.npmjs.com/package/tiptap)
[![](https://img.badgesize.io/https://unpkg.com/tiptap/dist/tiptap.min.js?compression=gzip&label=size&colorB=000000)](https://www.npmjs.com/package/tiptap)
[![Build Status](https://travis-ci.org/scrumpy/tiptap.svg?branch=master)](https://travis-ci.org/scrumpy/tiptap)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/ueberdosis/tiptap)
[![Version](https://img.shields.io/npm/v/tiptap.svg?label=version)](https://www.npmjs.com/package/tiptap)
[![Downloads](https://img.shields.io/npm/dm/tiptap.svg)](https://npmcharts.com/compare/tiptap?minimal=true)
[![License](https://img.shields.io/npm/l/tiptap.svg)](https://www.npmjs.com/package/tiptap)
[![Filesize](https://img.badgesize.io/https://unpkg.com/tiptap/dist/tiptap.min.js?compression=gzip&label=size&colorB=000000)](https://www.npmjs.com/package/tiptap)
[![Build Status](https://github.com/ueberdosis/tiptap/workflows/ci/badge.svg)](https://github.com/ueberdosis/tiptap/actions)
[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis)
## Why I built tiptap
I was looking for a text editor for [Vue.js](https://github.com/vuejs/vue) and found some solutions that didn't really satisfy me. The editor should be easy to extend and not based on old dependencies such as jQuery. For React there is already a great editor called [Slate.js](https://github.com/ianstormtaylor/slate), which impresses with its modularity. I came across [Prosemirror](https://github.com/prosemirror) and decided to build on it. Prosemirror is a toolkit for building rich-text editors that are already in use at many well-known companies such as *Atlassian* or *New York Times*.
### What does `renderless` mean?
With renderless components you'll have (almost) full control over markup and styling. I don't want to tell you what a menu should look like or where it should be rendered in the DOM. That's all up to you. There is also a [good article](https://adamwathan.me/renderless-components-in-vuejs/) about renderless components by Adam Wathan.
With renderless components you'll have (almost) full control over markup and styling. I don't want to tell you what a menu should look like or where it should be rendered in the DOM. That's all up to you. There is also a [good article about renderless components](https://adamwathan.me/renderless-components-in-vuejs/) by Adam Wathan.
### How is the data stored under the hood?
You can save your data as a raw `HTML` string or can get a `JSON`-serializable representation of your document. And of course, you can pass these two types back to the editor.
## 💖 Sponsor the development
Are you using tiptap in production? We need your sponsorship to maintain, update and develop tiptap. [Become a Sponsor now!](https://github.com/sponsors/ueberdosis)
## Examples
To check out some live examples, visit [tiptap.scrumpy.io](https://tiptap.scrumpy.io/).
To check out some live examples, visit [tiptap.dev](https://tiptap.dev/).
## Installation
```
@ -377,7 +385,7 @@ export default class BlockquoteNode extends Node {
### Create a Node as a Vue Component
The real power of the nodes comes in combination with Vue components. Let us build an iframe node, where you can change its URL (this can also be found in our [examples](https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Embeds)).
The real power of the nodes comes in combination with Vue components. Let us build an iframe node, where you can change its URL (this can also be found in our [examples](https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Embeds)).
```js
import { Node } from 'tiptap'
@ -483,6 +491,18 @@ yarn build:packages
yarn build:examples
```
## Contribute using the online one-click setup
You can use Gitpod(a free online VS Code-like IDE) for contributing. With a single click, it will launch a workspace and automatically:
- clone the `tiptap` repo.
- install the dependencies.
- run `yarn run start`.
So that anyone interested in contributing can start straight away.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ueberdosis/tiptap/)
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
@ -490,6 +510,7 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Credits
- [Philipp Kühn](https://github.com/philippkuehn)
- [Hans Pagel](https://github.com/hanspagel)
- [Christoph Flathmann](https://github.com/Chrissi2812)
- [Erick Wilder](https://github.com/erickwilder)
- [Marius Tolzmann](https://github.com/mariux)
@ -497,6 +518,8 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Related projects
- [html-to-prosemirror](https://github.com/ueberdosis/html-to-prosemirror) by @hanspagel
- [prosemirror-to-html](https://github.com/ueberdosis/prosemirror-to-html) by @hanspagel
- [tiptap-svelte](https://github.com/andrewjk/tiptap-svelte) by @andrewjk
- [Laravel Nova Tiptap Editor Field](https://github.com/manogi/nova-tiptap) by @manogi
- [WYSIWYG editor for Vuetify](https://github.com/iliyaZelenko/tiptap-vuetify) by @iliyaZelenko
@ -506,7 +529,7 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
- [WYSIWYG editor for Quasar Framework](https://github.com/donotebase/quasar-tiptap) by @mekery
## Love our work?
[Become a backer](https://www.paypal.me/philippkuehn) ❤️
[Sponsor us](https://github.com/sponsors/ueberdosis) ❤️
## License

View File

@ -14,7 +14,7 @@ function genConfig(opts) {
const banner = `
/*!
* ${opts.name} v${version}
* (c) ${new Date().getFullYear()} Scrumpy UG (limited liability)
* (c) ${new Date().getFullYear()} überdosis GbR (limited liability)
* @license MIT
*/
`

View File

@ -1,7 +0,0 @@
<template>
<a class="ad" href="https://scrumpy.io/" target="_blank">
<img class="ad__image" src="https://drop.philipp-kuehn.com/7RIu3ptVUQ.png" alt="Scrumpy. Agile, Made Simple. Get Started." />
</a>
</template>
<style lang="scss" src="./style.scss" scoped></style>

View File

@ -1,42 +0,0 @@
@import "~variables";
.ad {
display: block;
padding: 1rem;
transition: 0.2s transform;
margin: 3rem auto 0 auto;
width: 15rem;
@media (min-width: 1020px) {
position: fixed;
left: 0;
bottom: 0;
margin-top: 0;
}
&__image {
display: block;
width: 100%;
height: auto;
border-radius: 5px;
overflow: hidden;
transition: 0.2s box-shadow;
box-shadow:
0 2px 4px 0 rgba(black, 0.05),
0 2px 10px 0 rgba(black, 0.07)
;
}
&:hover {
transform: translateY(-5px);
}
&:hover &__image {
box-shadow:
0 2px 1px 0 rgba(black, 0.07),
0 5px 20px 0 rgba(black, 0.06),
0 8px 40px 0 rgba(black, 0.04)
;
}
}

View File

@ -20,8 +20,6 @@
</a>
</div>
<ad />
</div>
</template>
@ -30,7 +28,6 @@ import Navigation from 'Components/Navigation'
import Hero from 'Components/Hero'
import Subnavigation from 'Components/Subnavigation'
import Icon from 'Components/Icon'
import Ad from 'Components/Ad'
export default {
components: {
@ -38,7 +35,6 @@ export default {
Hero,
Subnavigation,
Icon,
Ad,
},
}
</script>

View File

@ -7,20 +7,20 @@
</h1>
<github-button
class="navigation__count"
href="https://github.com/scrumpy/tiptap"
href="https://github.com/ueberdosis/tiptap"
data-show-count="true"
aria-label="Star scrumpy/tiptap on GitHub"
aria-label="Star ueberdosis/tiptap on GitHub"
/>
</div>
<div>
<a class="navigation__link" href="https://tiptap.scrumpy.io/docs" target="_blank">
<a class="navigation__link" href="https://tiptap.dev/docs" target="_blank">
Documentation
</a>
<a class="navigation__link" href="https://github.com/scrumpy/tiptap/blob/master/CONTRIBUTING.md" target="_blank">
Contribute
<a class="navigation__link" href="https://github.com/sponsors/ueberdosis" target="_blank">
Sponsor
</a>
<a class="navigation__github-link" href="https://github.com/scrumpy/tiptap" target="_blank">
<a class="navigation__github-link" href="https://github.com/ueberdosis/tiptap" target="_blank">
<icon class="navigation__icon" name="github" />
</a>
</div>

View File

@ -41,7 +41,7 @@ export default {
Read-Only
</h2>
<p>
This text is <strong>read-only</strong>. You are not able to edit something. <a href="https://scrumpy.io/">Links to fancy websites</a> are still working.
This text is <strong>read-only</strong>. You are not able to edit something. <a href="https://ueber.io/">Links to fancy websites</a> are still working.
</p>
`,
}),

View File

@ -68,10 +68,14 @@ export default {
setTimeout(resolve, 500)
})
return [
{ id: 1, name: 'Philipp Kühn' },
{ id: 2, name: 'Hans Pagel' },
{ id: 3, name: 'Kris Siepert' },
{ id: 4, name: 'Justin Schueler' },
{ id: 1, name: 'Sven Adlung' },
{ id: 2, name: 'Patrick Baber' },
{ id: 3, name: 'Nick Hirche' },
{ id: 4, name: 'Philip Isik' },
{ id: 5, name: 'Timo Isik' },
{ id: 6, name: 'Philipp Kühn' },
{ id: 7, name: 'Hans Pagel' },
{ id: 8, name: 'Sebastian Schrama' },
]
},
// is called when a suggestion starts

View File

@ -15,154 +15,154 @@ const routes = [
path: '/',
component: () => import('Components/Routes/Basic'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Basic',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Basic',
},
},
{
path: '/menu-bubble',
component: () => import('Components/Routes/MenuBubble'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/MenuBubble',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/MenuBubble',
},
},
{
path: '/floating-menu',
component: () => import('Components/Routes/FloatingMenu'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/FloatingMenu',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/FloatingMenu',
},
},
{
path: '/links',
component: () => import('Components/Routes/Links'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Links',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Links',
},
},
{
path: '/images',
component: () => import('Components/Routes/Images'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Images',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Images',
},
},
{
path: '/hiding-menu-bar',
component: () => import('Components/Routes/HidingMenuBar'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/HidingMenuBar',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/HidingMenuBar',
},
},
{
path: '/tables',
component: () => import('Components/Routes/Tables'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Tables',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Tables',
},
},
{
path: '/todo-list',
component: () => import('Components/Routes/TodoList'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/TodoList',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/TodoList',
},
},
{
path: '/search-and-replace',
component: () => import('Components/Routes/SearchAndReplace'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/SearchAndReplace',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/SearchAndReplace',
},
},
{
path: '/suggestions',
component: () => import('Components/Routes/Suggestions'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Suggestions',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Suggestions',
},
},
{
path: '/markdown-shortcuts',
component: () => import('Components/Routes/MarkdownShortcuts'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/MarkdownShortcuts',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/MarkdownShortcuts',
},
},
{
path: '/code-highlighting',
component: () => import('Components/Routes/CodeHighlighting'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/CodeHighlighting',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/CodeHighlighting',
},
},
{
path: '/history',
component: () => import('Components/Routes/History'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/History',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/History',
},
},
{
path: '/read-only',
component: () => import('Components/Routes/ReadOnly'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/ReadOnly',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/ReadOnly',
},
},
{
path: '/embeds',
component: () => import('Components/Routes/Embeds'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Embeds',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Embeds',
},
},
{
path: '/placeholder',
component: () => import('Components/Routes/Placeholder'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Placeholder',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Placeholder',
},
},
{
path: '/focus',
component: () => import('Components/Routes/Focus'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Focus',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Focus',
},
},
{
path: '/collaboration',
component: () => import('Components/Routes/Collaboration'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Collaboration',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Collaboration',
},
},
{
path: '/title',
component: () => import('Components/Routes/Title'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Title',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Title',
},
},
{
path: '/trailing-paragraph',
component: () => import('Components/Routes/TrailingParagraph'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/TrailingParagraph',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/TrailingParagraph',
},
},
{
path: '/drag-handle',
component: () => import('Components/Routes/DragHandle'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/DragHandle',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/DragHandle',
},
},
{
path: '/export',
component: () => import('Components/Routes/Export'),
meta: {
githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Export',
githubUrl: 'https://github.com/ueberdosis/tiptap/tree/master/examples/Components/Routes/Export',
},
},
]

View File

@ -1,3 +1,13 @@
[[redirects]]
from = "https://tiptap.scrumpy.io"
to = "https://www.tiptap.dev"
status = 301
[[redirects]]
from = "https://tiptap.scrumpy.io/*"
to = "https://www.tiptap.dev/:splat"
status = 301
[[redirects]]
from = "/docs/*"
to = "https://tiptap-docs.netlify.com/:splat"
@ -7,3 +17,4 @@
from = "/*"
to = "/index.html"
status = 200

20570
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
{
"name": "tiptap-commands",
"version": "1.14.0",
"version": "1.14.3",
"description": "Commands for tiptap",
"homepage": "https://tiptap.scrumpy.io",
"homepage": "https://tiptap.dev",
"license": "MIT",
"main": "dist/commands.common.js",
"module": "dist/commands.esm.js",
@ -14,10 +14,10 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/scrumpy/tiptap.git"
"url": "git+https://github.com/ueberdosis/tiptap.git"
},
"bugs": {
"url": "https://github.com/scrumpy/tiptap/issues"
"url": "https://github.com/ueberdosis/tiptap/issues"
},
"dependencies": {
"prosemirror-commands": "^1.1.4",
@ -27,6 +27,6 @@
"prosemirror-state": "^1.3.3",
"prosemirror-tables": "^1.1.0",
"prosemirror-utils": "^0.9.6",
"tiptap-utils": "^1.10.0"
"tiptap-utils": "^1.10.3"
}
}

View File

@ -1,8 +1,8 @@
{
"name": "tiptap-extensions",
"version": "1.31.0",
"version": "1.31.3",
"description": "Extensions for tiptap",
"homepage": "https://tiptap.scrumpy.io",
"homepage": "https://tiptap.dev",
"license": "MIT",
"main": "dist/extensions.common.js",
"module": "dist/extensions.esm.js",
@ -15,10 +15,10 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/scrumpy/tiptap.git"
"url": "git+https://github.com/ueberdosis/tiptap.git"
},
"bugs": {
"url": "https://github.com/scrumpy/tiptap/issues"
"url": "https://github.com/ueberdosis/tiptap/issues"
},
"dependencies": {
"lowlight": "^1.14.0",
@ -30,8 +30,8 @@
"prosemirror-transform": "^1.2.6",
"prosemirror-utils": "^0.9.6",
"prosemirror-view": "^1.15.0",
"tiptap": "^1.29.0",
"tiptap-commands": "^1.14.0"
"tiptap": "^1.29.3",
"tiptap-commands": "^1.14.3"
},
"peerDependencies": {
"vue": "^2.5.17",

View File

@ -21,6 +21,9 @@ export default class History extends Extension {
'Mod-z': undo,
'Mod-y': redo,
'Shift-Mod-z': redo,
// Russian language
'Mod-я': undo,
'Shift-Mod-я': redo,
}
return keymap

View File

@ -1,8 +1,8 @@
{
"name": "tiptap-utils",
"version": "1.10.0",
"version": "1.10.3",
"description": "Utility functions for tiptap",
"homepage": "https://tiptap.scrumpy.io",
"homepage": "https://tiptap.dev",
"license": "MIT",
"main": "dist/utils.common.js",
"module": "dist/utils.esm.js",
@ -14,10 +14,10 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/scrumpy/tiptap.git"
"url": "git+https://github.com/ueberdosis/tiptap.git"
},
"bugs": {
"url": "https://github.com/scrumpy/tiptap/issues"
"url": "https://github.com/ueberdosis/tiptap/issues"
},
"dependencies": {
"prosemirror-model": "^1.10.0",

View File

@ -1,8 +1,8 @@
{
"name": "tiptap",
"version": "1.29.0",
"version": "1.29.3",
"description": "A rich-text editor for Vue.js",
"homepage": "https://tiptap.scrumpy.io",
"homepage": "https://tiptap.dev",
"license": "MIT",
"main": "dist/tiptap.common.js",
"module": "dist/tiptap.esm.js",
@ -14,10 +14,10 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/scrumpy/tiptap.git"
"url": "git+https://github.com/ueberdosis/tiptap.git"
},
"bugs": {
"url": "https://github.com/scrumpy/tiptap/issues"
"url": "https://github.com/ueberdosis/tiptap/issues"
},
"dependencies": {
"prosemirror-commands": "1.1.4",
@ -28,8 +28,8 @@
"prosemirror-model": "1.10.0",
"prosemirror-state": "1.3.3",
"prosemirror-view": "1.15.0",
"tiptap-commands": "^1.14.0",
"tiptap-utils": "^1.10.0"
"tiptap-commands": "^1.14.3",
"tiptap-utils": "^1.10.3"
},
"peerDependencies": {
"vue": "^2.5.17",

View File

@ -274,7 +274,7 @@ export default class Editor extends Emitter {
if (typeof content === 'string') {
const htmlString = `<div>${content}</div>`
const parser = new window.DOMParser()
const element = parser.parseFromString(htmlString, 'text/html').body
const element = parser.parseFromString(htmlString, 'text/html').body.firstElementChild
return DOMParser.fromSchema(this.schema).parse(element, parseOptions)
}