2022-11-21 21:28:53 +01:00
|
|
|
import { SanitizerConfig } from "./sanitizer-config";
|
|
|
|
|
2018-11-23 17:11:50 +01:00
|
|
|
/**
|
|
|
|
* Tool onPaste configuration object
|
|
|
|
*/
|
|
|
|
export interface PasteConfig {
|
|
|
|
/**
|
2022-11-21 21:28:53 +01:00
|
|
|
* Array of tags Tool can substitute.
|
|
|
|
*
|
|
|
|
* Could also contain a sanitize-config if you need to save some tag's attribute.
|
|
|
|
* For example:
|
|
|
|
* [
|
|
|
|
* {
|
|
|
|
* img: { src: true },
|
|
|
|
* }
|
|
|
|
* ],
|
2018-11-23 17:11:50 +01:00
|
|
|
* @type string[]
|
|
|
|
*/
|
2022-11-21 21:28:53 +01:00
|
|
|
tags?: (string | SanitizerConfig)[];
|
2018-11-23 17:11:50 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Object of string patterns Tool can substitute.
|
|
|
|
* Key is your internal key and value is RegExp
|
|
|
|
*
|
|
|
|
* @type {{[key: string]: Regexp}}
|
|
|
|
*/
|
|
|
|
patterns?: {[key: string]: RegExp};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Object with arrays of extensions and MIME types Tool can substitute
|
|
|
|
*/
|
|
|
|
files?: {extensions?: string[], mimeTypes?: string[]};
|
|
|
|
}
|