mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 09:52:36 +02:00
69a5c21bb6
* Rename to Editor.js in package, comments and docs * More changes * Done with renaming in code, docs, and comments * Revert renaming of tools org * Update submodules * Changes due comments * Fix double slash * editorjs -> @editorjs/editorjs * Update package.json Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com> * Update webpack.config.js Co-Authored-By: gohabereg <gohabereg@users.noreply.github.com> * Update bundle
24 lines
535 B
TypeScript
24 lines
535 B
TypeScript
import Module from '../../__module';
|
|
import {Sanitizer} from '../../../../types/api';
|
|
|
|
/**
|
|
* @class SanitizerAPI
|
|
* Provides Editor.js 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);
|
|
}
|
|
|
|
}
|