Unable to save most embed types
Hi hope I can explain this well.
When trying to use the Embed Tool, most embed types get blocked in editorjs-html by default with this error message:
Saving failed: Error: Only Youtube and Vime Embeds are supported right now.
I tried looking at the PR that introduced this but I couldn't figure out why it was being blocked.
Is there a way to allow other embeds through "as-is" as raw HTML? So this way we can create our custom embeds and just have it saved. There are probably thousands of different sites that provide embeds so it would be impractical to have a specific code for each one, that's why I'm wondering about a fallback 'raw HTML' approach?
Thanks
OK I think a workaround could be, define a custom parser (which editorjs-html) allows, and have it just
function embedParser(block){
return `<iframe src="${block.data.embed}" scrolling="no" frameborder="0" style="border: none;" width="600" height="557" data-external="1"></iframe>`
}
And then give it to the parser when you initialise it
const edjsParser = edjsHTML({ embed: embedParser, });