add language support to code blocks

This commit is contained in:
Hans Pagel
2020-09-30 16:25:32 +02:00
parent 5d7435f3fe
commit 576f3e1caa
2 changed files with 29 additions and 1 deletions

View File

@@ -69,6 +69,16 @@ context('/api/extensions/code-block', () => {
})
})
it('should parse the language from a HTML code block', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<pre><code class="language-css">body { display: none; }</code></pre>')
cy.get('.ProseMirror')
.find('pre>code.language-css')
.should('have.length', 1)
})
})
it('should make a code block for js', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.clearContent()