iframe
filters.iframe
Pandoc filter to add iframe elements to quarto documents.
This is helpful for showing other pages, especially in demos.
Demo and Usage
See the demo here.
Classes
| Name | Description |
|---|---|
| Config | Schema used to validate quarto metadata. |
| FilterIFrame | Iframe filter. |
| IFrameConfig | IFrame filter configuration. |
Config
filters.iframe.Config()Schema used to validate quarto metadata.
Specifies many iframes.
Attributes
| Name | Type | Description |
|---|---|---|
| iframes | Annotated[dict[str, IFrameConfig] | None, pydantic.Field(None), pydantic.BeforeValidator(util.content_from_list_identifier)] | An optional list of iframe configurations. |
FilterIFrame
filters.iframe.FilterIFrame(self, doc=None)Iframe filter.
IFrameConfig
filters.iframe.IFrameConfig()IFrame filter configuration.
Specifies exactly one iframe.
Attributes
| Name | Type | Description |
|---|---|---|
| target | Annotated[str, pydantic.Field(), schemas.create_check_items(False, singleton=True)] | URL or path to the target. |
| height | Annotated[str, pydantic.Field('512px')] | Height of the iframe. |
| kind | FieldKind | Document type. |
Methods
| Name | Description |
|---|---|
| hydrate | Turn :param:element into an iframe. |
hydrate
filters.iframe.IFrameConfig.hydrate(element)Turn :param:element into an iframe.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| element | pf.Element | Element to inject the iframe into. | required |
Returns
| Name | Type | Description |
|---|---|---|
| pf.Element | :param:element with iframe content injected. |