diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8dddcf8cfe..c6ce86ae66 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,7 @@ - `Fix` — Fix problem with entering to Editor.js by Tab key [#1393](https://github.com/codex-team/editor.js/issues/1393) - `Fix` - Sanitize pasted block data [#1396](https://github.com/codex-team/editor.js/issues/1396). - `Fix` - Unnecessary block creation after arrow navigation at last non-default block[#1414](https://github.com/codex-team/editor.js/issues/1414) +- `Fix` - Fix SanitizerConfig type definition[#1456](https://github.com/codex-team/editor.js/pull/1456) ### 2.19 diff --git a/types/configs/sanitizer-config.d.ts b/types/configs/sanitizer-config.d.ts index c3854d0471..4dea899b55 100644 --- a/types/configs/sanitizer-config.d.ts +++ b/types/configs/sanitizer-config.d.ts @@ -1,3 +1,5 @@ +type Option = boolean | { [attr: string]: boolean | string }; + export interface SanitizerConfig { /** * Tag name and params not to be stripped off @@ -31,5 +33,5 @@ export interface SanitizerConfig { * } * } */ - [key: string]: boolean|{[attr: string]: boolean|string}|(() => any); + [key: string]: Option | ((el: HTMLElement) => Option); }