mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 09:52:36 +02:00
48ac2271f9
Co-authored-by: Murod Khaydarov <murod.haydarov@gmail.com> Co-authored-by: Petr Savchenko <specc.dev@gmail.com> Co-authored-by: George Berezhnoy <gohabereg@gmail.com> Co-authored-by: Taly Guryn <vitalik7tv@yandex.ru>
1.1 KiB
1.1 KiB
CodeX Editor Sanitizer Module
The Sanitizer
module represents a set of methods that clears taint strings.
Uses lightweight npm package with simple API html-janitor
Sanitizer class implements basic Module class that holds User configuration and default CodeX Editor instances
You can read more about Module class here
Properties
Default Editor Sanitizer configuration according to the html-janitor API
defaultConfig
Custom User configuration which passed on Editor initialization. Data type must be according to the html-janitor API
sanitizerConfig
Property that holds an instance used in Module
sanitizerInstance
Methods
clean
clean(taintString, customConfig)
Cleans up the passed taint string
params
Param | Type | Description |
---|---|---|
taintString | String | string that needs to be cleaned |
customConfig | Object | Can be passed new config per usage (Default: uses default configuration) |