[plugin development] does zotero UI support the iframe or browser label to embed online website?

67 views
Skip to first unread message

Lumos Lovegood

unread,
Feb 8, 2025, 5:55:58 PMFeb 8
to zotero-dev
does zotero UI support the iframe or browser label to embed online website?

such as embed online website in right panel or dialog

XY Wong

unread,
Feb 11, 2025, 11:23:37 PMFeb 11
to zotero-dev
A minimal example (replace the id and resources with your own) :


Zotero.ItemPaneManager.registerSection({
paneID: "test",
pluginID: "[email protected]",
header: {
l10nID: "",
icon: "",
},
sidenav: {
l10nID: "",
icon: "",
},
onRender: ({ doc, body }) => {
let browser = doc.createXULElement("browser");
browser.id = "custom-browser";
browser.setAttribute("type", "content");
browser.setAttribute("remote", "true");
browser.setAttribute("maychangeremoteness", "true");
browser.setAttribute("disableglobalhistory", "true");
browser.style.width = "100%";
browser.style.height = "200px";
browser.style.display = "block";
body.append(browser);
},
onAsyncRender: ({ body }) => {
body.querySelector("#custom-browser").src = "https://www.zotero.org";
},
});

Reply all
Reply to author
Forward
0 new messages