Open muescha opened 4 years ago
create a map with embedders and then you can just grab the formatter from a map like
embedders
const embedder = embedders[tagName]; if(!embedder) return; let embed = embedder(tagOptions);
you can use for example require-dir-all then each embed plugin can register itself in a embedders map
require-dir-all
or just a manual created map
Can I see an example, please?
I understand where you're heading to but I don't really understand your suggested implementation.
Please describe the feature you'd like:
Suggested Implementation
create a map with
embedders
and then you can just grab the formatter from a map likeyou can use for example
require-dir-all
then each embed plugin can register itself in aembedders
mapor just a manual created map