,, tags and
* for allow only `href` attribute and allow only `src` attribute == '1.png'
* }
* });
* editor.value = 'Sorry! Goodby\
* mr. Freeman';
* console.log(editor.value); //Sorry! Freeman
* ```
*
* @example
* ```javascript
* const editor = Jodit.make('#editor', {
* cleanHTML: {
* allowTags: {
* p: true,
* a: {
* href: true
* },
* table: true,
* tr: true,
* td: true,
* img: {
* src: '1.png'
* }
* }
* }
* });
* ```
*/
allowTags: false | string | IDictionary;
denyTags: false | string | IDictionary;
/**
* Node filtering rules that do not need to be applied to content
* The full list of rules is generated dynamically from the folder
* https://github.com/xdan/jodit/tree/master/src/plugins/clean-html/helpers/visitor/filters
*/
disableCleanFilter: Nullable>;
};
}
}
Config.prototype.cleanHTML = {
timeout: 300,
removeEmptyElements: true,
fillEmptyParagraph: true,
replaceNBSP: true,
replaceOldTags: {
i: 'em',
b: 'strong'
},
allowTags: false,
denyTags: false,
useIframeSandbox: false,
removeOnError: true,
safeJavaScriptLink: true,
disableCleanFilter: null
};
Config.prototype.controls.eraser = {
command: 'removeFormat',
tooltip: 'Clear Formatting'
};
Icon.set('eraser', require('./eraser.svg'));
|