mirror of
https://github.com/codex-team/editor.js
synced 2024-05-23 00:32:28 +02:00
a88dc8e30b
* refactoring(modules): sanitizer module is util now * Remove Sanitizer from Editor modules signature * Bind context to config composition method * Make sanitizer singletone * Make sanitizer a module instead of class * Fix * Add test cases for default values * Fix inline tools default value * Move inline tools and block tunes to BlockTool instance * Fixes after review & some test cases for sanitisation * Upgrade test case Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
34 lines
968 B
TypeScript
34 lines
968 B
TypeScript
// in cypress/support/index.d.ts
|
|
// load type definitions that come with Cypress module
|
|
/// <reference types="cypress" />
|
|
|
|
import type { EditorConfig } from './../../../types/index';
|
|
import type EditorJS from '../../../types/index'
|
|
|
|
declare global {
|
|
namespace Cypress {
|
|
interface Chainable<Subject = any> {
|
|
/**
|
|
* Custom command to select DOM element by data-cy attribute.
|
|
* @param editorConfig - config to pass to the editor
|
|
* @example cy.createEditor({})
|
|
*/
|
|
createEditor(editorConfig: EditorConfig): Chainable<EditorJS>
|
|
|
|
/**
|
|
* Paste command to dispatch paste event
|
|
*
|
|
* @usage
|
|
* cy.get('div').paste({'text/plain': 'Text', 'text/html': '<b>Text</b>'})
|
|
*
|
|
* @param data - map with MIME type as a key and data as value
|
|
*/
|
|
paste(data: {[type: string]: string}): Chainable<Subject>
|
|
}
|
|
|
|
interface ApplicationWindow {
|
|
EditorJS: typeof EditorJS
|
|
}
|
|
}
|
|
}
|