Embed Tables as a iframe

I am using tables from [the Observable Inputs notebook(Observable Input: Table / Observable / Observable), but I notice I cannot embed the table as a iframe, and the preview window shows nothing. Is it because the Table function is still under development?

1 Like

Be sure to fork the notebook, then name the cell, and finally republish (or link share) your copy. Then, you should be able to embed the cell. It looks like you did the first two but not the last.

1 Like

I think I already published the copy, because I can embed other cell, not the cell containing the table.

@haoshuai If this is still an issue for you, then please share the link to your notebook here.

Sorry for the late reply. Here is the notebook. I tried to embed the table in the cell “rank.”

Like this?

<iframe width="100%" height="350" frameborder="0"

It works now. Interesting. Nothing shows up when I tried to embed this earlier.

In your original screenshot (two whole weeks ago, sorry I didn’t see this sooner!) there’s that “Republish your notebook to embed the latest changes” warning at the top, so I wonder if the rank cell had changed since last publish?

If a cell doesn’t exist in the latest published version (i.e. you added it since publish), the checkbox will be disabled, so that can’t be it. But it is possible for the preview to not match what you see in the notebook. The notebook shows you latest version, but the embed iframe preview can only show you the latest published version.

So I’m not sure what was happening, and it’s possible it was just a fluke, or slow to load, or a bug. But in general, if an embed preview isn’t showing what you expect, try republishing before looking at the preview. (Though I understand that’s not always possible or desirable.)

1 Like