mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 02:35:23 -04:00
Add slide mode with reveal.js
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
29565f8f89
commit
36e445e631
70 changed files with 1225 additions and 323 deletions
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
declare namespace Cypress {
|
||||
interface Chainable {
|
||||
/**
|
||||
|
@ -13,7 +12,7 @@ declare namespace Cypress {
|
|||
*/
|
||||
fill(value: string): Chainable<Element>
|
||||
|
||||
codemirrorFill(value: string): Chainable<Element>
|
||||
setCodemirrorContent(value: string): Chainable<Element>
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,12 +24,14 @@ Cypress.Commands.add('fill', {
|
|||
.trigger('change', { force: true })
|
||||
})
|
||||
|
||||
Cypress.Commands.add('codemirrorFill', (content: string) => {
|
||||
Cypress.Commands.add('setCodemirrorContent', (content: string) => {
|
||||
const line = content.split('\n')
|
||||
.find(value => value !== '')
|
||||
cy.get('.CodeMirror')
|
||||
.click()
|
||||
.get('textarea')
|
||||
.type('{ctrl}a')
|
||||
.type('{backspace}')
|
||||
.fill(content)
|
||||
if (line) {
|
||||
cy.get('.CodeMirror')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue