Usage:
To create an embed simply create a link to the resource and add a
name="embed" property to that link. If the resource referenced by that link is in your allowed list and all the other optional criteria (path and query) matches then an embed is created to replace that link.
You could also enable the "automatically embed" option on the preferences tab which would then embed any link that matches any hosts you've added to the allowed list (and any additional criteria in path or query) regardless of whether it had the
name="embed" property.
Coding:
The created iframes are given classes matching the domain where their resources are hosted, an iframe from
docs.google.com for example would be given a class of
docs_google_com. Any additional criteria specified for that domain would also add additional class names so if the entry for
docs.google.com specified that the link also needed to have "
spreadsheets" and "
pubhtml" in the path before it would be converted to an iframe then the classes of
path-spreadsheets and
path-pubhtml would also be added to the iframe after conversion for styling different resources from the same domain.
The plugin provides an ad hoc CSS default size for the two requested domains that come preconfigured via the classes as specified above but the author of the post has the ability to override that styling by providing the posted link with an inline style
[a href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQk6EWBOt3sDJO_sixcISzUtZRLC91rRcG0iM_Ok1cskElELdLkJgsIbk0M3C-mdueNY796FtJMtMNt/pubhtml?widget=true&headers=false" name="embed" style="width:450px;height:450px;"]gdoc spreadsheet[/a]