mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-25 12:39:03 +08:00
Merge branch 'main' of https://github.com/ueberdosis/tiptap-next into main
This commit is contained in:
commit
709c10697c
5
docs/src/demos/Extensions/HardBreak/index.spec.js
Normal file
5
docs/src/demos/Extensions/HardBreak/index.spec.js
Normal file
@ -0,0 +1,5 @@
|
||||
context('/api/extensions/hard-break', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/api/extensions/hard-break')
|
||||
})
|
||||
})
|
55
docs/src/demos/Extensions/HardBreak/index.vue
Normal file
55
docs/src/demos/Extensions/HardBreak/index.vue
Normal file
@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div v-if="editor">
|
||||
<editor-content :editor="editor" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Editor } from '@tiptap/core'
|
||||
import { EditorContent } from '@tiptap/vue'
|
||||
import Document from '@tiptap/extension-document'
|
||||
import Paragraph from '@tiptap/extension-paragraph'
|
||||
import Text from '@tiptap/extension-text'
|
||||
// import HardBreak from '@tiptap/extension-hard-break'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
EditorContent,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
editor: null,
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.editor = new Editor({
|
||||
extensions: [
|
||||
Document(),
|
||||
Paragraph(),
|
||||
Text(),
|
||||
// HardBreak(),
|
||||
],
|
||||
content: `
|
||||
<p>
|
||||
This<br>
|
||||
is<br>
|
||||
a<br>
|
||||
single<br>
|
||||
paragraph<br>
|
||||
with<br>
|
||||
line<br>
|
||||
breaks.
|
||||
</p>
|
||||
`,
|
||||
})
|
||||
|
||||
window.editor = this.editor
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.editor.destroy()
|
||||
}
|
||||
}
|
||||
</script>
|
@ -11,7 +11,7 @@ The Blockquote extension enables you to use the `<blockquote>` HTML tag in the e
|
||||
| ---------- | ------- | ----------------------------- |
|
||||
| blockquote | — | Wrap content in a blockquote. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* `Control` + `→`
|
||||
|
||||
## Usage
|
||||
|
@ -17,7 +17,7 @@ The extension will generate the corresponding `<strong>` HTML tags when reading
|
||||
| ------- | ------- | --------------- |
|
||||
| bold | — | Mark text bold. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* Windows & Linux: `Control` + `B`
|
||||
* macOS: `Command` + `B`
|
||||
|
||||
|
@ -15,7 +15,7 @@ It’s intended to be used with the `ListItem` extension.
|
||||
| ----------- | ------- | --------------------- |
|
||||
| bullet_list | — | Toggle a bullet list. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* `Control` + `Shift` + `8`
|
||||
|
||||
## Usage
|
||||
|
@ -7,5 +7,5 @@ Enables you to use the `<pre>` HTML tag with auto-detected syntax highlighting i
|
||||
## Commands
|
||||
*None*
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
*None*
|
@ -7,5 +7,5 @@ Enables you to use the `<pre>` HTML tag in the editor.
|
||||
## Commands
|
||||
*None*
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
*None*
|
@ -11,7 +11,7 @@ The Code extensions enables you to use the `<code>` HTML tag in the editor. If y
|
||||
| ------- | ------- | ------------------------- |
|
||||
| code | — | Mark text as inline code. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* `Alt` + `
|
||||
|
||||
## Source Code
|
||||
|
@ -1,9 +1,18 @@
|
||||
# HardBreak
|
||||
Enables you to use the `<br>` HTML tag in the editor.
|
||||
The HardBreak extensions adds support for the `<br>` HTML tag, which forces a line break.
|
||||
|
||||
## Options
|
||||
*None*
|
||||
|
||||
## Keybindings
|
||||
* `Command` + `Enter`
|
||||
* `Shift` + `Enter`
|
||||
## Commands
|
||||
*None*
|
||||
|
||||
## Keyboard shortcuts
|
||||
* Windows & Linux: `Shift` + `Enter`
|
||||
* macOS: `Command` + `Enter`
|
||||
|
||||
## Source Code
|
||||
[packages/extension-hard-break/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-hard-break/)
|
||||
|
||||
## Usage
|
||||
<demo name="Extensions/HardBreak" highlight="13,32" />
|
||||
|
@ -12,7 +12,7 @@ Enables you to use headline HTML tags in the editor.
|
||||
| ------- | ------- | ----------------------- |
|
||||
| heading | level | Creates a heading node. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* `Control` + `Shift` + `1` → H1
|
||||
* `Control` + `Shift` + `2` → H2
|
||||
* `Control` + `Shift` + `3` → H3
|
||||
|
@ -10,7 +10,7 @@ This extension provides history support. All changes to the document will be tra
|
||||
| undo | — | Undo the last change. |
|
||||
| redo | — | Redo the last change. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* Windows & Linux: `Control` + `Z`
|
||||
* macOS: `Command` + `Z`
|
||||
|
||||
|
@ -11,7 +11,7 @@ Enables you to use the `<hr>` HTML tag in the editor.
|
||||
| --------------- | ------- | ------------------------- |
|
||||
| horizontal_rule | — | Create a horizontal rule. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
*None*
|
||||
|
||||
## Usage
|
||||
|
@ -15,7 +15,7 @@ The extension will generate the corresponding `<em>` HTML tags when reading cont
|
||||
| ------- | ------- | ----------------- |
|
||||
| italic | — | Mark text italic. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* Windows & Linux: `Control` + `I`
|
||||
* macOS: `Command` + `I`
|
||||
|
||||
|
@ -15,7 +15,7 @@ This extensions is intended to be used with the `ListItem` extension.
|
||||
| ------------ | ------- | ----------------------- |
|
||||
| ordered_list | — | Toggle an ordered list. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* `Control` + `Shift` + `9`
|
||||
|
||||
## Usage
|
||||
|
@ -9,7 +9,7 @@ Yes, the schema is very strict. Without this extension you won’t even be able
|
||||
## Commands
|
||||
*None*
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
*None*
|
||||
|
||||
## Source Code
|
||||
|
@ -11,7 +11,7 @@ Enables you to use the `<s>` HTML tag in the editor.
|
||||
| ------- | ------- | --------------------------- |
|
||||
| strike | — | Mark text as strikethrough. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* Windows & Linux: `Control` + `D`
|
||||
* macOS: `Command` + `D`
|
||||
|
||||
|
@ -13,5 +13,5 @@ This extensions is intended to be used with the `TodoList` extension.
|
||||
## Commands
|
||||
*None*
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
*None*
|
@ -13,7 +13,7 @@ This extensions is intended to be used with the `TodoItem` extension.
|
||||
| --------- | ------- | ----------------- |
|
||||
| todo_list | — | Toggle todo list. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
*None*
|
||||
|
||||
## Usage
|
||||
|
@ -11,7 +11,7 @@ Enables you to use the `<u>` HTML tag in the editor.
|
||||
| --------- | ------- | ------------------------ |
|
||||
| underline | — | Mark text as underlined. |
|
||||
|
||||
## Keybindings
|
||||
## Keyboard shortcuts
|
||||
* Windows & Linux: `Control` + `U`
|
||||
* macOS: `Command` + `U`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user