diff --git a/docs/src/demos/Extensions/Bold/index.spec.js b/docs/src/demos/Extensions/Bold/index.spec.js index bb910cc4..8437be92 100644 --- a/docs/src/demos/Extensions/Bold/index.spec.js +++ b/docs/src/demos/Extensions/Bold/index.spec.js @@ -13,9 +13,6 @@ context('/api/extensions/bold', () => { it('should make the selected text bold', () => { cy.get('.demo__preview button:first').click({ force: true }) cy.get('.ProseMirror').contains('strong', 'Example Text') - - cy.get('.demo__preview button:first').click({ force: true }) - cy.get('.ProseMirror strong').should('not.exist') }) it('should toggle the selected text bold', () => { diff --git a/docs/src/demos/Extensions/Code/index.spec.js b/docs/src/demos/Extensions/Code/index.spec.js new file mode 100644 index 00000000..11727f60 --- /dev/null +++ b/docs/src/demos/Extensions/Code/index.spec.js @@ -0,0 +1,23 @@ +context('/api/extensions/code', () => { + beforeEach(() => { + cy.visit('/api/extensions/code') + + cy.get('.ProseMirror').window().then(window => { + const { editor } = window + editor.setContent('
Example Text
') + editor.focus().selectAll() + }) + }) + + describe('code', () => { + it('should mark the selected text as inline code', () => { + cy.get('.demo__preview button:first').click({ force: true }) + cy.get('.ProseMirror').contains('code', 'Example Text') + }) + + it('should toggle the selected text as inline code', () => { + cy.get('.demo__preview button:first').dblclick({ force: true }) + cy.get('.ProseMirror code').should('not.exist') + }) + }) +}) \ No newline at end of file diff --git a/docs/src/demos/Extensions/Code/index.vue b/docs/src/demos/Extensions/Code/index.vue new file mode 100644 index 00000000..4f51c0cd --- /dev/null +++ b/docs/src/demos/Extensions/Code/index.vue @@ -0,0 +1,51 @@ + +` HTML tag in the editor.
+The Code extensions enables you to use the `` HTML tag in the editor. If you paste in text with `` tags it will rendered accordingly.
## Options
*None*
## Commands
| Command | Options | Description |
-| ------ | ---- | ---------------- |
-| code | — | Mark text as code. |
+| ------- | ------- | ----------- |
+| code | — | Mark text as inline code. |
## Keybindings
* `Alt` + `
+## Source Code
+[packages/extension-code/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-code/)
+
## Usage
-```markup
-
-
-
-
-
-
-
-
-
-
-
-```
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/src/docPages/api/extensions/italic.md b/docs/src/docPages/api/extensions/italic.md
index d41a4b0e..7c6dbe93 100644
--- a/docs/src/docPages/api/extensions/italic.md
+++ b/docs/src/docPages/api/extensions/italic.md
@@ -10,7 +10,7 @@ The extension will generate the corresponding `` HTML tags when reading cont
## Commands
| Command | Options | Description |
-| ------ | ---- | ---------------- |
+| ------- | ------- | ----------- |
| italic | — | Mark text italic. |
## Keybindings
diff --git a/docs/src/links.yaml b/docs/src/links.yaml
index af737226..0f344861 100644
--- a/docs/src/links.yaml
+++ b/docs/src/links.yaml
@@ -117,7 +117,6 @@
draft: true
- title: Code
link: /api/extensions/code
- draft: true
- title: CodeBlock
link: /api/extensions/code-block
draft: true