editor.js
editor.js copied to clipboard
pasteConfig with sanitizer config for tag as function is not working
Example - i want my embed video tool can handle this html:
<p><iframe src="..."></iframe></p>
in pasteConfig i have specified
static get pasteConfig(): PasteConfig | boolean | undefined {
return {
tags: [{
iframe: true,
p: function(el){
return el.firstElementChild?.tagName === 'IFRAME';
}
}],
};
}
My expectation is that only iframe or iframe in p tag will be handled by my tool, but currently all p tags event without iframe inside are passed to my tool (like p: true in config)
Expected behavior: Allow use all functionality of sanitizerconfig for pasteconfig
Device, Browser, OS: PC, Chrome, Ubuntu 22.04
Editor.js version: 2.27.0-rc.3
Sorry, seen in docs that it is just for sanitizing. But would be a great idea to have abiliti configure pasteConfig for more specific cases like described