diff --git a/docs/src/demos/Extensions/Strike/index.spec.js b/docs/src/demos/Extensions/Strike/index.spec.js new file mode 100644 index 00000000..74f56923 --- /dev/null +++ b/docs/src/demos/Extensions/Strike/index.spec.js @@ -0,0 +1,5 @@ +context('/api/extensions/strike', () => { + beforeEach(() => { + cy.visit('/api/extensions/strike') + }) +}) \ No newline at end of file diff --git a/docs/src/demos/Extensions/Strike/index.vue b/docs/src/demos/Extensions/Strike/index.vue new file mode 100644 index 00000000..983b393c --- /dev/null +++ b/docs/src/demos/Extensions/Strike/index.vue @@ -0,0 +1,54 @@ + + + \ No newline at end of file diff --git a/docs/src/docPages/api/extensions/bold.md b/docs/src/docPages/api/extensions/bold.md index f7daa154..a98ef14e 100644 --- a/docs/src/docPages/api/extensions/bold.md +++ b/docs/src/docPages/api/extensions/bold.md @@ -1,5 +1,5 @@ # Bold -This extension is used to render text in **bold**. If you pass ``, `` tags, or text with inline `style` attributes setting the `font-weight` CSS rule in the editor’s initial content, they will all be rendered accordingly. +This extension is used to render text in **bold**. If you pass ``, `` tags, or text with inline `style` attributes setting the `font-weight` CSS rule in the editor’s initial content, they all will be rendered accordingly. Type `**two asterisks**` or `__two underlines__` and the it will be magically transformed to **bold** text while you type. diff --git a/docs/src/docPages/api/extensions/italic.md b/docs/src/docPages/api/extensions/italic.md index 892453ef..e566ed22 100644 --- a/docs/src/docPages/api/extensions/italic.md +++ b/docs/src/docPages/api/extensions/italic.md @@ -1,5 +1,5 @@ # Italic -This extension is used to render text in *italic*. If you pass ``, `` tags, or text with inline `style` attributes setting `font-style: italic` in the editor’s initial content, they will all be rendered accordingly. +This extension is used to render text in *italic*. If you pass ``, `` tags, or text with inline `style` attributes setting `font-style: italic` in the editor’s initial content, they all will be rendered accordingly. ::: warning Restrictions The extension will generate the corresponding `` HTML tags when reading contents of the `Editor` instance. All text marked italic, regardless of the method will be normalized to `` HTML tags. diff --git a/docs/src/docPages/api/extensions/strike.md b/docs/src/docPages/api/extensions/strike.md index d562d6cc..57b5096d 100644 --- a/docs/src/docPages/api/extensions/strike.md +++ b/docs/src/docPages/api/extensions/strike.md @@ -1,5 +1,11 @@ # Strike -Enables you to use the `` HTML tag in the editor. +This extension is used to render ~~striked text~~. If you pass ``, ``, `` tags, or text with inline `style` attributes setting `text-decoration: line-through` in the editor’s initial content, they all will be rendered accordingly. + +Type `~~two tildes~~` and the it will be magically ~~striked through~~ while you type. + +::: warning Restrictions +The extension will generate the corresponding `` HTML tags when reading contents of the `Editor` instance. All text striked through, regardless of the method will be normalized to `` HTML tags. +::: ## Options | Option | Type | Default | Description | @@ -15,47 +21,8 @@ Enables you to use the `` HTML tag in the editor. * Windows & Linux: `Control` + `D` * macOS: `Command` + `D` +## Source Code +[packages/extension-strike/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-strike/) + ## Usage -```markup - - - -``` \ No newline at end of file +