From 26a83add5af48e7ad97444af1b84ffdec5df8068 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Mon, 16 Nov 2020 21:36:18 +0100 Subject: [PATCH 1/6] update content --- docs/src/docPages/api/nodes/blockquote.md | 2 +- docs/src/docPages/api/overview.md | 2 +- docs/src/docPages/introduction.md | 14 +++++++------- yarn.lock | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/src/docPages/api/nodes/blockquote.md b/docs/src/docPages/api/nodes/blockquote.md index 66de2089..7a58e85d 100644 --- a/docs/src/docPages/api/nodes/blockquote.md +++ b/docs/src/docPages/api/nodes/blockquote.md @@ -1,6 +1,6 @@ # Blockquote -The Blockquote extension enables you to use the `
` HTML tag in the editor. This is great – you might have guessed – to use quotes in the editor. +The Blockquote extension enables you to use the `
` HTML tag in the editor. This is great to use quotes in the editor. Type at the beginning of a new line and it will magically transform to a blockquote. diff --git a/docs/src/docPages/api/overview.md b/docs/src/docPages/api/overview.md index 46b551c6..bba5c93a 100644 --- a/docs/src/docPages/api/overview.md +++ b/docs/src/docPages/api/overview.md @@ -1,5 +1,5 @@ # Overview -tiptap is a friendly wrapper around [ProseMirror](https://ProseMirror.net). +tiptap is a friendly wrapper around [ProseMirror](https://ProseMirror.net). Although tiptap tries to hide most of the complexity of ProseMirror, it’s built on top of its APIs and we recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/) for advanced usage. ### Structure ProseMirror works with a strict [Schema](/api/schema), which defines the allowed structure of a document. A document is a tree of headings, paragraphs and others elements, so called nodes. Marks can be attached to a node, e. g. to emphasize part of it. [Commands](/api/commands) change that document programmatically. diff --git a/docs/src/docPages/introduction.md b/docs/src/docPages/introduction.md index 333857a8..ef415063 100644 --- a/docs/src/docPages/introduction.md +++ b/docs/src/docPages/introduction.md @@ -7,20 +7,18 @@ Nothing here is production-ready, don’t use it anywhere. ::: # Introduction - - - - +[![Version](https://img.shields.io/npm/v/@tiptap/core.svg?label=version)](https://www.npmjs.com/package/@tiptap/core) +[![Downloads](https://img.shields.io/npm/dm/@tiptap/core.svg)](https://npmcharts.com/compare/@tiptap/core?minimal=true) +[![License](https://img.shields.io/npm/l/@tiptap/core.svg)](https://www.npmjs.com/package/@tiptap/core) [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/ueberdosis) -tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich-text WYSIWYG editors, which is already in use at many well-known companies such as *New York Times*, *The Guardian* or *Atlassian*. +tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as *New York Times*, *The Guardian* or *Atlassian*. -Although tiptap tries to hide most of the complexity of ProseMirror, it’s built on top of its APIs and we recommend you to read through the [ProseMirror Guide](https://ProseMirror.net/docs/guide/) for advanced usage. You’ll have a better understanding of how everything works under the hood and get more familiar with many terms and jargon used by tiptap. +Create exactly the rich text editor you want out of modular, and customizable building blocks. Tiptap comes with sensible defaults, many default extensions and a friendly API. It’s open source, free, and backed by a welcoming community. ## Features - **Headless.** We don’t tell you what a menu should look like or where it should be rendered in the DOM. That’s why tiptap is headless and comes without any CSS. You are in full control over markup and styling. **Framework-agnostic.** We don’t care what framework you use. tiptap is ready to be used with plain JavaScript or Vue.js. That makes it even possible to write a renderer for React, Svelte and others. @@ -34,6 +32,8 @@ Although tiptap tries to hide most of the complexity of ProseMirror, it’s buil - [ApostropheCMS](https://apostrophecms.com) - [Directus CMS](https://directus.io) - [Nextcloud](https://apps.nextcloud.com/apps/text) +- [DocIQ](https://www.dociq.io) +- [Scrumpy](https://www.scrumpy.io) - [and many more →](https://github.com/ueberdosis/tiptap/network/dependents?package_id=UGFja2FnZS0xMzE5OTg0ODc%3D) ## License diff --git a/yarn.lock b/yarn.lock index fbdb210c..88daf830 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2145,7 +2145,7 @@ defer-to-connect "^1.0.1" "@tiptap/core@2.x": - version "2.0.0-alpha.1" + version "2.0.0-alpha.3" dependencies: "@types/prosemirror-schema-list" "^1.0.1" prosemirror-commands "^1.1.3" From c94b43feeb7bbbdbbca1d137fda24682fe3be21f Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Mon, 16 Nov 2020 21:43:20 +0100 Subject: [PATCH 2/6] add websocket example --- docs/package.json | 1 + .../CollaborativeEditingWs/index.spec.js | 5 + .../Examples/CollaborativeEditingWs/index.vue | 331 ++++++++++++++++++ .../examples/collaborative-editing-ws.md | 5 + docs/src/links.yaml | 6 +- yarn.lock | 187 +++++++++- 6 files changed, 530 insertions(+), 5 deletions(-) create mode 100644 docs/src/demos/Examples/CollaborativeEditingWs/index.spec.js create mode 100644 docs/src/demos/Examples/CollaborativeEditingWs/index.vue create mode 100644 docs/src/docPages/examples/collaborative-editing-ws.md diff --git a/docs/package.json b/docs/package.json index 2d8beafe..317e7d13 100644 --- a/docs/package.json +++ b/docs/package.json @@ -27,6 +27,7 @@ "vue-live": "^1.15.1", "y-indexeddb": "^9.0.5", "y-webrtc": "^10.1.6", + "y-websocket": "^1.3.6", "yjs": "^13.4.4" }, "devDependencies": { diff --git a/docs/src/demos/Examples/CollaborativeEditingWs/index.spec.js b/docs/src/demos/Examples/CollaborativeEditingWs/index.spec.js new file mode 100644 index 00000000..3d46c471 --- /dev/null +++ b/docs/src/demos/Examples/CollaborativeEditingWs/index.spec.js @@ -0,0 +1,5 @@ +context('/examples/collaborative-editing-ws', () => { + before(() => { + cy.visit('/examples/collaborative-editing-ws') + }) +}) diff --git a/docs/src/demos/Examples/CollaborativeEditingWs/index.vue b/docs/src/demos/Examples/CollaborativeEditingWs/index.vue new file mode 100644 index 00000000..acedbb82 --- /dev/null +++ b/docs/src/demos/Examples/CollaborativeEditingWs/index.vue @@ -0,0 +1,331 @@ + + + + + diff --git a/docs/src/docPages/examples/collaborative-editing-ws.md b/docs/src/docPages/examples/collaborative-editing-ws.md new file mode 100644 index 00000000..fd0ffe4a --- /dev/null +++ b/docs/src/docPages/examples/collaborative-editing-ws.md @@ -0,0 +1,5 @@ +# Collaborative editing + +Websockets + + diff --git a/docs/src/links.yaml b/docs/src/links.yaml index 0fffe82d..4418a035 100644 --- a/docs/src/links.yaml +++ b/docs/src/links.yaml @@ -14,8 +14,12 @@ items: - title: Basic link: /examples/basic - - title: Collaborative editing + - title: Collaborative editing (WebRTC) link: /examples/collaborative-editing + pro: true + - title: Collaborative editing (WS) + link: /examples/collaborative-editing-ws + draft: true - title: Markdown shortcuts link: /examples/markdown-shortcuts - title: Formatting diff --git a/yarn.lock b/yarn.lock index 88daf830..318b8fce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2816,6 +2816,28 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +abstract-leveldown@^6.2.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a" + integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +abstract-leveldown@~6.2.1, abstract-leveldown@~6.2.3: + version "6.2.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz#036543d87e3710f2528e47040bc3261b77a9a8eb" + integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + accepts@^1.3.7, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -3194,6 +3216,11 @@ async-foreach@^0.1.3: resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" integrity sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI= +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + async@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" @@ -3659,7 +3686,7 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@^5.2.1, buffer@^5.5.0: +buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -5144,6 +5171,14 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +deferred-leveldown@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" + integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== + dependencies: + abstract-leveldown "~6.2.1" + inherits "^2.0.3" + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -5533,6 +5568,16 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +encoding-down@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.3.0.tgz#b1c4eb0e1728c146ecaef8e32963c549e76d082b" + integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== + dependencies: + abstract-leveldown "^6.2.1" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + encoding@^0.1.11: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -5593,7 +5638,7 @@ err-code@^2.0.3: resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== -errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: +errno@^0.1.1, errno@^0.1.3, errno@~0.1.1, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== @@ -7673,6 +7718,11 @@ imagemin@^6.1.0: pify "^4.0.1" replace-ext "^1.0.0" +immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + import-cwd@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9" @@ -8601,6 +8651,88 @@ less@^3.9.0: native-request "^1.0.5" source-map "~0.6.0" +level-codec@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" + integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== + dependencies: + buffer "^5.6.0" + +level-concat-iterator@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz#1d1009cf108340252cb38c51f9727311193e6263" + integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== + +level-errors@^2.0.0, level-errors@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" + integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== + dependencies: + errno "~0.1.1" + +level-iterator-stream@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" + integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== + dependencies: + inherits "^2.0.4" + readable-stream "^3.4.0" + xtend "^4.0.2" + +level-js@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/level-js/-/level-js-5.0.2.tgz#5e280b8f93abd9ef3a305b13faf0b5397c969b55" + integrity sha512-SnBIDo2pdO5VXh02ZmtAyPP6/+6YTJg2ibLtl9C34pWvmtMEmRTWpra+qO/hifkUtBTOtfx6S9vLDjBsBK4gRg== + dependencies: + abstract-leveldown "~6.2.3" + buffer "^5.5.0" + inherits "^2.0.3" + ltgt "^2.1.2" + +level-packager@^5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.1.1.tgz#323ec842d6babe7336f70299c14df2e329c18939" + integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== + dependencies: + encoding-down "^6.3.0" + levelup "^4.3.2" + +level-supports@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" + integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== + dependencies: + xtend "^4.0.2" + +level@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/level/-/level-6.0.1.tgz#dc34c5edb81846a6de5079eac15706334b0d7cd6" + integrity sha512-psRSqJZCsC/irNhfHzrVZbmPYXDcEYhA5TVNwr+V92jF44rbf86hqGp8fiT702FyiArScYIlPSBTDUASCVNSpw== + dependencies: + level-js "^5.0.0" + level-packager "^5.1.0" + leveldown "^5.4.0" + +leveldown@^5.4.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.6.0.tgz#16ba937bb2991c6094e13ac5a6898ee66d3eee98" + integrity sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ== + dependencies: + abstract-leveldown "~6.2.1" + napi-macros "~2.0.0" + node-gyp-build "~4.1.0" + +levelup@^4.3.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.4.0.tgz#f89da3a228c38deb49c48f88a70fb71f01cafed6" + integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== + dependencies: + deferred-leveldown "~5.3.0" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -8621,7 +8753,7 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -lib0@^0.2.12, lib0@^0.2.28, lib0@^0.2.32, lib0@^0.2.33, lib0@^0.2.34: +lib0@^0.2.12, lib0@^0.2.28, lib0@^0.2.31, lib0@^0.2.32, lib0@^0.2.33, lib0@^0.2.34: version "0.2.34" resolved "https://registry.yarnpkg.com/lib0/-/lib0-0.2.34.tgz#c4479f5f2083894687fcfa9d0b9d9935e35ea008" integrity sha512-cqsVIMPgFlDtgQcpkt7HOY6W3sbYPIe3qxMnbRSwHTgiQancgm+TRDPx28mC6GUZ6lG6Nr0bIWf4Nog6dWUNUg== @@ -8785,6 +8917,11 @@ lodash.clonedeep@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= + lodash.deburr@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/lodash.deburr/-/lodash.deburr-4.1.0.tgz#ddb1bbb3ef07458c0177ba07de14422cb033ff9b" @@ -8965,6 +9102,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +ltgt@^2.1.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" @@ -9581,6 +9723,11 @@ napi-build-utils@^1.0.1: resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== +napi-macros@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" + integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== + native-request@^1.0.5: version "1.0.8" resolved "https://registry.yarnpkg.com/native-request/-/native-request-1.0.8.tgz#8f66bf606e0f7ea27c0e5995eb2f5d03e33ae6fb" @@ -9652,6 +9799,11 @@ node-fetch@^2.5.0, node-fetch@^2.6.1: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-gyp-build@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz#d7270b5d86717068d114cc57fff352f96d745feb" + integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ== + node-gyp@^5.0.2: version "5.1.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" @@ -14757,6 +14909,13 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +ws@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" + integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + dependencies: + async-limiter "~1.0.0" + ws@^7.2.0: version "7.4.0" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.0.tgz#a5dd76a24197940d4a8bb9e0e152bb4503764da7" @@ -14780,7 +14939,7 @@ xss@^1.0.6: commander "^2.20.3" cssfilter "0.0.10" -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -14792,6 +14951,14 @@ y-indexeddb@^9.0.5: dependencies: lib0 "^0.2.12" +y-leveldb@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/y-leveldb/-/y-leveldb-0.1.0.tgz#8b60c1af020252445875ebc70d52666017bcb038" + integrity sha512-sMuitVrsAUNh+0b66I42nAuW3lCmez171uP4k0ePcTAJ+c+Iw9w4Yq3wwiyrDMFXBEyQSjSF86Inc23wEvWnxw== + dependencies: + level "^6.0.1" + lib0 "^0.2.31" + y-prosemirror@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/y-prosemirror/-/y-prosemirror-1.0.0.tgz#a3d0a36726355979a8e88814c40851851e5bf241" @@ -14817,6 +14984,18 @@ y-webrtc@^10.1.6: optionalDependencies: ws "^7.2.0" +y-websocket@^1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/y-websocket/-/y-websocket-1.3.6.tgz#bafe1a92dc555a71ac18e6f63b0409957d061d6c" + integrity sha512-b4V/xw7l0NN6E7FTLEXayHq67QQA2UoXH/y48gvd6L7wQApnB84tg6t3Wo/aXtby1x02G5J3moN+4k+IIQsCDQ== + dependencies: + lib0 "^0.2.31" + lodash.debounce "^4.0.8" + y-leveldb "^0.1.0" + y-protocols "^1.0.0" + optionalDependencies: + ws "^6.2.1" + y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" From bcddffee092ef6673ca083b3fafac0c90a3804a6 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Tue, 17 Nov 2020 12:39:39 +0100 Subject: [PATCH 3/6] docs: update content --- docs/src/docPages/api/overview.md | 2 - docs/src/docPages/guide/get-started.md | 79 ++++++++++++++++++++++ docs/src/docPages/guide/getting-started.md | 30 -------- docs/src/links.yaml | 20 +++--- yarn.lock | 4 +- 5 files changed, 92 insertions(+), 43 deletions(-) create mode 100644 docs/src/docPages/guide/get-started.md delete mode 100644 docs/src/docPages/guide/getting-started.md diff --git a/docs/src/docPages/api/overview.md b/docs/src/docPages/api/overview.md index bba5c93a..506219fd 100644 --- a/docs/src/docPages/api/overview.md +++ b/docs/src/docPages/api/overview.md @@ -9,5 +9,3 @@ The document is stored in a state. All changes are applied as transactions to th ### Extensions Extensions add [nodes](/api/nodes), [marks](/api/marks) and/or [functionalities](/api/extensions) to the editor. A lot of those extensions bound their commands to common [keyboard shortcuts](/api/keyboard-shortcuts). - -All those concepts are explained in detail on the following pages. diff --git a/docs/src/docPages/guide/get-started.md b/docs/src/docPages/guide/get-started.md new file mode 100644 index 00000000..348dade4 --- /dev/null +++ b/docs/src/docPages/guide/get-started.md @@ -0,0 +1,79 @@ +# Get started + +## toc + +## Introduction +tiptap is framework-agnostic and even works with plain JavaScript, if that’s your thing. To keep everthing as small and flexible as possible, it’s all very modular. Let’s take a few basic building blocks for a test drive. + +## Requirements +The following guide assumes you’re working with Vue.js. Hopefully, that helps to get you going with other frameworks (or without a framework at all), while we’re working on more guides. We also assume you’ve [set up Node.js](https://nodejs.org/en/download/) on your machine already. + +## 1. Create a new project + +### Install Vue CLI (optional) +```bash +# with npm +npm install -g @vue/cli +# with Yarn +yarn global add @vue/cli +``` + +Let’s start with a fresh Vue.js project. If you already have an existing Vue.js project, that’s fine too. Just skip this first step and proceed with the next step. + +### Create a project (optional) +Pick *Default ([Vue 2] babel, eslint)* + +```bash +# create a project +vue create tiptap-example + +# change directory +cd tiptap-example +``` + +### Install the dependencies +You can install tiptap for Vue.js as a dependency in your project: + +```bash +# install the Vue.js adapter with npm +npm install @tiptap/core @tiptap/vue-starter-kit + +# or: install the Vue.js adapter with Yarn +yarn add @tiptap/core @tiptap/vue-starter-kit +``` + +The `@tiptap/vue-starter-kit` includes a few basics you would probably need anyway. Cool, you have got everything in place to start fiddling around with tiptap! 🙌 + +Start your project with `$ yarn serve` or `$ npm run serve`. Open [http://localhost:8080/](http://localhost:8080/) in your favorite browser. + +## 2. Create a new component +Create a new Vue component (you can call it ``) and add the following content. This is the fastest way to get tiptap up and running with Vue.js. It will give you a very basic version of tiptap, without any buttons. No worries, you will be able to add more functionality soon. + + + +## 3. Add it to your app + +```js + + + +``` + +::: warning Nuxt.js +If you use Nuxt.js, note that tiptap needs to run in the client, not on the server. It’s required to wrap the editor in a `` tag. +::: + +Congrats! You’ve got it! 🎉 Let’s start to configure your editor in the next step. diff --git a/docs/src/docPages/guide/getting-started.md b/docs/src/docPages/guide/getting-started.md deleted file mode 100644 index 2ebbd29f..00000000 --- a/docs/src/docPages/guide/getting-started.md +++ /dev/null @@ -1,30 +0,0 @@ -# Getting started - -## toc - -## Introduction -tiptap is framework-agnostic and works with Vue.js and React. It even works with plain JavaScript, if that’s your thing. To keep everything as small as possible, we put the code to use tiptap with those frameworks in different packages. - -## 1. Install the dependencies -We assume you already have a [Vue.js](https://cli.vuejs.org/) (or [Nuxt.js](https://nuxtjs.org/)) project. To connect tiptap with Vue.js you are going to need an adapter. You can install tiptap for Vue.js as a dependency in your project: - -```bash -# Install the Vue.js adapter with npm -npm install @tiptap/vue @tiptap/vue-starter-kit - -# Or: Install the Vue.js adapter with Yarn -yarn add @tiptap/vue @tiptap/vue-starter-kit -``` - -The `@tiptap/vue-starter-kit` includes a few basics you would probably need anyway. Cool, you have got everything in place to set up tiptap! 🙌 - -## 2. Create a new component -Create a new Vue component (you can call it ``) and add the following content. This is the fastest way to get tiptap up and running with Vue.js. It will give you a very basic version of tiptap, without any buttons. No worries, you will be able to add more functionality soon. - - - -::: warning Nuxt.js -If you use Nuxt.js, note that tiptap needs to run in the client, not on the server. It’s required to wrap the editor in a `` tag. -::: - -Congrats! You’ve got it! 🎉 Let’s start to configure your editor in the next step. diff --git a/docs/src/links.yaml b/docs/src/links.yaml index 4418a035..1522c185 100644 --- a/docs/src/links.yaml +++ b/docs/src/links.yaml @@ -14,7 +14,7 @@ items: - title: Basic link: /examples/basic - - title: Collaborative editing (WebRTC) + - title: Collaborative editing link: /examples/collaborative-editing pro: true - title: Collaborative editing (WS) @@ -41,30 +41,30 @@ - title: Guide items: - - title: Getting started - link: /guide/getting-started + - title: Get started + link: /guide/get-started draft: true - - title: Configuration + - title: Configure the editor link: /guide/configuration draft: true - - title: Create your editor + - title: Create a new toolbar link: /guide/create-your-editor draft: true - - title: Custom styling + - title: Add custom styling link: /guide/custom-styling - title: Store content link: /guide/store-content - title: Build custom extensions link: /guide/build-custom-extensions - - title: Collaborative editing - link: /guide/collaborative-editing - draft: true - pro: true - title: Advanced node views link: /guide/advanced-node-views draft: true - title: Working with TypeScript link: /guide/working-with-typescript + - title: Collaborative editing + link: /guide/collaborative-editing + draft: true + pro: true - title: API items: diff --git a/yarn.lock b/yarn.lock index 318b8fce..931eea28 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2145,7 +2145,9 @@ defer-to-connect "^1.0.1" "@tiptap/core@2.x": - version "2.0.0-alpha.3" + version "2.0.0-alpha.4" + resolved "https://registry.yarnpkg.com/@tiptap/core/-/core-2.0.0-alpha.4.tgz#396fab673b33749bc7567d90cd5c776f8481569c" + integrity sha512-AGZ23UL9mMpxYQEq3KfX8RgtiyOzAgl/IJwPJzy8cW1Bp3V5ua5JEeC6QeoWhy7V05+nXhoZSysIGK8m7VV52Q== dependencies: "@types/prosemirror-schema-list" "^1.0.1" prosemirror-commands "^1.1.3" From c70b1b3e58e79fb9cb6c04ac098b2e29dd55409a Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Tue, 17 Nov 2020 13:42:37 +0100 Subject: [PATCH 4/6] add netlify redirect config --- docs/src/static/_redirects | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 docs/src/static/_redirects diff --git a/docs/src/static/_redirects b/docs/src/static/_redirects new file mode 100644 index 00000000..1138e57d --- /dev/null +++ b/docs/src/static/_redirects @@ -0,0 +1,4 @@ +/overview / +/examples /examples/basic +/guide /guide/get-started +/api /api/overview From 7e2c794527422d0927657cdedee87d82de36a196 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Tue, 17 Nov 2020 13:42:48 +0100 Subject: [PATCH 5/6] add algolia to the privavy policy --- docs/src/docPages/privacy-policy.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/src/docPages/privacy-policy.md b/docs/src/docPages/privacy-policy.md index 1c19fad6..1e51f4a4 100644 --- a/docs/src/docPages/privacy-policy.md +++ b/docs/src/docPages/privacy-policy.md @@ -11,14 +11,21 @@ We don’t provide email support for tiptap, but if you have some legal issues, ## List of external services -### GitHub +### Community (GitHub) We use [GitHub](http://github.com/) to store our code, collaborate, give support, and offer sponsorships. Check their [privacy statement](https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-privacy-statement) to learn more about what data they process. -### Netlify +### Hosting (Netlify) We use Netlify to host the documentation. It features continuous deployment from Git across a global application delivery network and full integration with Let’s Encrypt. If you want to know more, [read Netlify’s privacy policy](https://www.netlify.com/privacy/). -### Simple Analytics +### Tracking (Simple Analytics) We use [Simple Analytics](https://simpleanalytics.com/) to gain insight about our visitors in general. It doesn’t track individual users per se and does not store any personal identifiable information. Go to their documentation to find out what Simple Analytics collects (and more importantly what they don’t). Or have a look at the [public analytics dashboard](https://simpleanalytics.com/tiptap.dev) they provide. It’s not a stripped down version, it’s the exact same dashboard we use to check the traffic. +### Search (Algolia) +We use [Algolia DocSearch](https://docsearch.algolia.com/) to offer search functionality for the documentation. They crawl the same pages as you see once every day. If you click on the search field on top of this page, their search interface pops up. + +If you want to know more about what data they collect and process, [read their privacy policy](https://www.algolia.com/policies/privacy/). + +## Suggesting alternatives +If you know a good self-hosted version of any of the mentioned services, create an issue on GitHub or send us an email to [humans@tiptap.dev](mailto:humans@tiptap.dev). From 3cfe234ee0400c07b365726eaa96c2c37727fdbb Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Tue, 17 Nov 2020 14:04:15 +0100 Subject: [PATCH 6/6] docs: update content --- docs/src/docPages/guide/get-started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/docPages/guide/get-started.md b/docs/src/docPages/guide/get-started.md index 348dade4..99e4603b 100644 --- a/docs/src/docPages/guide/get-started.md +++ b/docs/src/docPages/guide/get-started.md @@ -3,7 +3,9 @@ ## toc ## Introduction -tiptap is framework-agnostic and even works with plain JavaScript, if that’s your thing. To keep everthing as small and flexible as possible, it’s all very modular. Let’s take a few basic building blocks for a test drive. +tiptap 2 is framework-agnostic and even works with plain JavaScript, if that’s your thing. As the previous major version required Vue.js, we decided to focus on Vue.js in the first version of this guide. That said, it’s probably also helpful for developers who work with different technologies. + +Let’s take a few basic building blocks for a test drive. ## Requirements The following guide assumes you’re working with Vue.js. Hopefully, that helps to get you going with other frameworks (or without a framework at all), while we’re working on more guides. We also assume you’ve [set up Node.js](https://nodejs.org/en/download/) on your machine already.