mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 18:03:25 +02:00
24 lines
538 B
TypeScript
24 lines
538 B
TypeScript
|
import Module from '../../__module';
|
||
|
import {Sanitizer} from '../../../../types/api';
|
||
|
|
||
|
/**
|
||
|
* @class SanitizerAPI
|
||
|
* Provides CodeX Editor Sanitizer that allows developers to clean their HTML
|
||
|
*/
|
||
|
export default class SanitizerAPI extends Module {
|
||
|
/**
|
||
|
* Available methods
|
||
|
* @return {Sanitizer}
|
||
|
*/
|
||
|
get methods(): Sanitizer {
|
||
|
return {
|
||
|
clean: (taintString, config) => this.clean(taintString, config),
|
||
|
};
|
||
|
}
|
||
|
|
||
|
public clean(taintString, config) {
|
||
|
return this.Editor.Sanitizer.clean(taintString, config);
|
||
|
}
|
||
|
|
||
|
}
|