Skip to content

Commit

Permalink
Fix SanitizerConfig type definition
Browse files Browse the repository at this point in the history
  • Loading branch information
hata6502 committed Dec 3, 2020
1 parent bbbd637 commit b532025
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion types/configs/sanitizer-config.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
type Option = boolean | { [attr: string]: boolean | string };

export interface SanitizerConfig {
/**
* Tag name and params not to be stripped off
Expand Down Expand Up @@ -31,5 +33,5 @@ export interface SanitizerConfig {
* }
* }
*/
[key: string]: boolean|{[attr: string]: boolean|string}|(() => any);
[key: string]: Option | ((el: HTMLElement) => Option);
}

0 comments on commit b532025

Please sign in to comment.