update the gapcursor page & example
This commit is contained in:
@@ -9,7 +9,7 @@ import { Editor, EditorContent } from '@tiptap/vue-starter-kit'
|
|||||||
import Document from '@tiptap/extension-document'
|
import Document from '@tiptap/extension-document'
|
||||||
import Paragraph from '@tiptap/extension-paragraph'
|
import Paragraph from '@tiptap/extension-paragraph'
|
||||||
import Text from '@tiptap/extension-text'
|
import Text from '@tiptap/extension-text'
|
||||||
import Gapcursor from '@tiptap/extension-focus'
|
import Gapcursor from '@tiptap/extension-gapcursor'
|
||||||
import Image from '@tiptap/extension-image'
|
import Image from '@tiptap/extension-image'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
Gapcursor(),
|
Gapcursor(),
|
||||||
],
|
],
|
||||||
content: `
|
content: `
|
||||||
<p>Try to set the cursor behind the image!</p>
|
<p>Try to set the cursor behind the image with your arrow keys! You should see big blinking cursor right from the image. This is the gapcursor.</p>
|
||||||
<img src="https://source.unsplash.com/8xznAGy4HcY/800x400" />
|
<img src="https://source.unsplash.com/8xznAGy4HcY/800x400" />
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
@@ -46,13 +46,14 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/* Copied form the original prosemirror-gapcursor plugin by Marijn Haverbeke */
|
/* Copied from the original prosemirror-gapcursor plugin by Marijn Haverbeke */
|
||||||
/* https://github.com/ProseMirror/prosemirror-gapcursor/blob/master/style/gapcursor.css */
|
/* https://github.com/ProseMirror/prosemirror-gapcursor/blob/master/style/gapcursor.css */
|
||||||
|
|
||||||
.ProseMirror-gapcursor {
|
.ProseMirror-gapcursor {
|
||||||
display: none;
|
display: none;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
border: 10px solid red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ProseMirror-gapcursor:after {
|
.ProseMirror-gapcursor:after {
|
||||||
|
|||||||
@@ -16,4 +16,4 @@ yarn add @tiptap/extension-gapcursor
|
|||||||
[packages/extension-gapcursor/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-gapcursor/)
|
[packages/extension-gapcursor/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-gapcursor/)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
<demo name="Extensions/Gapcursor" highlight="" />
|
<demo name="Extensions/Gapcursor" highlight="12,33" />
|
||||||
|
|||||||
@@ -173,7 +173,6 @@
|
|||||||
draft: true
|
draft: true
|
||||||
- title: Gapcursor
|
- title: Gapcursor
|
||||||
link: /api/extensions/gapcursor
|
link: /api/extensions/gapcursor
|
||||||
draft: true
|
|
||||||
- title: History
|
- title: History
|
||||||
link: /api/extensions/history
|
link: /api/extensions/history
|
||||||
- title: TextAlign
|
- title: TextAlign
|
||||||
|
|||||||
Reference in New Issue
Block a user