editor.js/src/components/modules/api/sanitizer.ts
George Berezhnoy 69a5c21bb6
Rename to Editor.js (#625)
* 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
2019-02-28 14:01:32 +03:00

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);
}
}