Skip to content

Iframes #61

Answered by boisgera
sHermanGriffiths asked this question in Q&A
Discussion options

You must be logged in to vote

There is no Iframe class in the Python pandoc library since there is no such type in the Pandoc Haskell collection of types.

But if you want to include iframes in a pandoc document (programatically) you can use the RawBlock class. An example would be:

import pandoc
from pandoc.types import Pandoc, Meta, RawBlock, Header, Str

header = Header(1, ["", [], []], [Str("OSM")])

iframe = RawBlock("html",
"""
<iframe
  id="inlineFrameExample"
  title="Inline Frame Example"
  width="300"
  height="200"
  src="https://www.openstreetmap.org/export/embed.html?bbox=-0.004017949104309083%2C51.47612752641776%2C0.00030577182769775396%2C51.478569861898606&layer=mapnik"
>
</iframe>
"""
)


doc = Pandoc(Meta

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sHermanGriffiths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants