diff --git a/docs/src/demos/Examples/CollaborativeEditing/index.vue b/docs/src/demos/Examples/CollaborativeEditing/index.vue index d5bf961c7..af1c20573 100644 --- a/docs/src/demos/Examples/CollaborativeEditing/index.vue +++ b/docs/src/demos/Examples/CollaborativeEditing/index.vue @@ -1,14 +1,83 @@ - - diff --git a/docs/src/demos/Examples/History/index.spec.js b/docs/src/demos/Examples/History/index.spec.js deleted file mode 100644 index 8e5d02acc..000000000 --- a/docs/src/demos/Examples/History/index.spec.js +++ /dev/null @@ -1,31 +0,0 @@ -context('/examples/history', () => { - before(() => { - cy.visit('/examples/history') - }) - - beforeEach(() => { - cy.get('.ProseMirror').then(([{ editor }]) => { - editor.clearContent() - }) - }) - - it('should not have a mistake', () => { - cy.get('.ProseMirror').then(() => { - cy.get('.ProseMirror').should('not.contain', 'Mistake') - }) - }) - - it('should have a mistake', () => { - cy.get('.ProseMirror').then(([{ editor }]) => { - editor.insertText('Mistake') - cy.get('.ProseMirror').should('contain', 'Mistake') - }) - }) - - it('the mistake should be removed again', () => { - cy.get('.ProseMirror').then(([{ editor }]) => { - editor.undo() - cy.get('.ProseMirror').should('not.contain', 'Mistake') - }) - }) -}) diff --git a/docs/src/demos/Examples/History/index.vue b/docs/src/demos/Examples/History/index.vue deleted file mode 100644 index 578c39268..000000000 --- a/docs/src/demos/Examples/History/index.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - diff --git a/docs/src/demos/Extensions/Focus/index.vue b/docs/src/demos/Extensions/Focus/index.vue index b4c7f0f34..fa38363e4 100644 --- a/docs/src/demos/Extensions/Focus/index.vue +++ b/docs/src/demos/Extensions/Focus/index.vue @@ -10,6 +10,9 @@ import Document from '@tiptap/extension-document' import Paragraph from '@tiptap/extension-paragraph' import Text from '@tiptap/extension-text' import Focus from '@tiptap/extension-focus' +import Code from '@tiptap/extension-code' +import BulletList from '@tiptap/extension-bullet-list' +import ListItem from '@tiptap/extension-list-item' export default { components: { @@ -32,15 +35,19 @@ export default { className: 'has-focus', nested: true, }), + Code(), + BulletList(), + ListItem(), ], autoFocus: true, content: `

The focus extension adds a class to the focused node only. That enables you to add a custom styling to just that node. By default, it’ll add .has-focus, even to nested nodes.

-

- Nested elements will be focused with the default setting nested: true. Otherwise the whole item will get the focus class, even when just a single nested item is selected. -

+ `, }) }, diff --git a/docs/src/demos/Extensions/History/index.vue b/docs/src/demos/Extensions/History/index.vue index dec37b123..b44d168e0 100644 --- a/docs/src/demos/Extensions/History/index.vue +++ b/docs/src/demos/Extensions/History/index.vue @@ -39,7 +39,12 @@ export default { History(), ], content: ` -

Edit this text and press undo to test this extension.

+

+ With the History extension the Editor will keep track of your changes. And if you think you made a mistake, you can redo your changes. Try it out, change the content and hit the undo button! +

+

+ And yes, you can also use a keyboard shortcut to undo changes (Control/Cmd Z) or redo changes (Control/Cmd Shift Z). +

`, }) }, diff --git a/docs/src/docPages/api/extensions/focus.md b/docs/src/docPages/api/extensions/focus.md index ff888d6d6..122a67b6b 100644 --- a/docs/src/docPages/api/extensions/focus.md +++ b/docs/src/docPages/api/extensions/focus.md @@ -22,4 +22,4 @@ yarn add @tiptap/extension-focus [packages/extension-focus/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-focus/) ## Usage - + diff --git a/docs/src/docPages/examples/collaborative-editing.md b/docs/src/docPages/examples/collaborative-editing.md index a765b688c..2af3c0b58 100644 --- a/docs/src/docPages/examples/collaborative-editing.md +++ b/docs/src/docPages/examples/collaborative-editing.md @@ -10,10 +10,10 @@ It connects client with WebRTC and merges changes to the document (no matter whe If you want to learn more about collaborative text editing, [check out our guide on that topic](/guide/collaborative-editing). Anyway, it’s showtime now: -:::warning The content of this editor is shared with other users from the Internet. -Don’t share your password, credit card numbers or other things you wouldn’t make public. +:::warning Shared Document +Be nice! The content of this editor is shared with other users from the Internet. ::: - + diff --git a/docs/src/docPages/examples/focus.md b/docs/src/docPages/examples/focus.md deleted file mode 100644 index be7024ea8..000000000 --- a/docs/src/docPages/examples/focus.md +++ /dev/null @@ -1,3 +0,0 @@ -# Focus - - diff --git a/docs/src/docPages/examples/history.md b/docs/src/docPages/examples/history.md deleted file mode 100644 index 6ef788199..000000000 --- a/docs/src/docPages/examples/history.md +++ /dev/null @@ -1,3 +0,0 @@ -# History - - \ No newline at end of file diff --git a/docs/src/docPages/guide/advanced-node-views.md b/docs/src/docPages/guide/advanced-node-views.md new file mode 100644 index 000000000..96df369b8 --- /dev/null +++ b/docs/src/docPages/guide/advanced-node-views.md @@ -0,0 +1 @@ +# Advanced node views diff --git a/docs/src/docPages/guide/use-vue-components.md b/docs/src/docPages/guide/use-vue-components.md deleted file mode 100644 index 312a0889b..000000000 --- a/docs/src/docPages/guide/use-vue-components.md +++ /dev/null @@ -1 +0,0 @@ -# Use Vue Components \ No newline at end of file diff --git a/docs/src/docPages/guide/working-with-typescript.md b/docs/src/docPages/guide/working-with-typescript.md new file mode 100644 index 000000000..726780656 --- /dev/null +++ b/docs/src/docPages/guide/working-with-typescript.md @@ -0,0 +1,12 @@ +# Working with TypeScript + +## toc + +## Introduction + + +## Options type + + +## Create a command + diff --git a/docs/src/links.yaml b/docs/src/links.yaml index fe1323d33..dba8f7f99 100644 --- a/docs/src/links.yaml +++ b/docs/src/links.yaml @@ -25,13 +25,8 @@ draft: true - title: Todo App link: /examples/todo-app - draft: true - - title: History - link: /examples/history - title: Read-only link: /examples/read-only - - title: Focus - link: /examples/focus - title: Minimalist link: /examples/minimalist - title: Export HTML or JSON @@ -54,13 +49,16 @@ link: /guide/store-content - title: Build custom extensions link: /guide/build-custom-extensions - # - title: Use Vue Components - # link: /guide/use-vue-components - # draft: true - title: Collaborative editing link: /guide/collaborative-editing draft: true premium: true + - title: Advanced node views + link: /guide/advanced-node-views + draft: true + - title: Working with TypeScript + link: /guide/working-with-typescript + draft: true - title: API items: