mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 23:59:25 +08:00
Merge branch 'issue/remove-code-block-with-backspace-after-blank-lines' of https://github.com/ueberdosis/tiptap-next
This commit is contained in:
commit
ec61a37558
@ -125,4 +125,46 @@ context('/demos/Nodes/CodeBlock', () => {
|
||||
.should('contain', 'Code')
|
||||
})
|
||||
})
|
||||
|
||||
it.only('reverts the markdown shortcut when pressing backspace', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.clearContent()
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('``` {backspace}')
|
||||
|
||||
cy.get('.ProseMirror pre')
|
||||
.should('not.exist')
|
||||
})
|
||||
})
|
||||
|
||||
it.only('removes the code block when pressing backspace', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.clearContent()
|
||||
|
||||
cy.get('.ProseMirror pre')
|
||||
.should('not.exist')
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('Paragraph{enter}``` A{backspace}{backspace}')
|
||||
|
||||
cy.get('.ProseMirror pre')
|
||||
.should('not.exist')
|
||||
})
|
||||
})
|
||||
|
||||
it.only('removes the code block when pressing backspace, even with blank lines', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.clearContent()
|
||||
|
||||
cy.get('.ProseMirror pre')
|
||||
.should('not.exist')
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('Paragraph{enter}{enter}``` A{backspace}{backspace}')
|
||||
|
||||
cy.get('.ProseMirror pre')
|
||||
.should('not.exist')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user