Zotero.PreferencePanes.register with inline HTML

7 views
Skip to first unread message

Emiliano Heyns

unread,
Mar 24, 2026, 9:09:54 AM (yesterday) Mar 24
to zotero-dev
Does the xhtml file loaded through Zotero.PreferencePanes.register allow inline html? I know I can register it with `scripts` but I find it easier to have script and html together.

XY Wong

unread,
Mar 24, 2026, 9:49:40 AM (yesterday) Mar 24
to zotero-dev
Do you mean inline <script/>? Yes.

You can always use a mixture of html and xul elements.

Emiliano Heyns

unread,
Mar 24, 2026, 9:56:26 AM (yesterday) Mar 24
to zoter...@googlegroups.com
I have this in my prefs html:

<script>Zotero.debug('bbt: prefs')</script>
<html:script>Zotero.debug('bbt: html prefs')</html:script>

but neither message is showing up.

--
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/0p7BYMndq8Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/zotero-dev/6c7c1144-4469-4aa5-b560-2a7dc9ceb670n%40googlegroups.com.

Abe Jellinek

unread,
Mar 24, 2026, 10:14:01 AM (yesterday) Mar 24
to zoter...@googlegroups.com
That may not work (I haven’t tested, and we don’t use inline <script> in built-in prefpanes). We needed a workaround to get inline event handlers working in the parsed XHTML fragment, and I’m guessing inline scripts have a similar issue.

You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/zotero-dev/CAHOSGO4bUTnO%2B1XB6DLZCoFACoUczUHGUeGHuu6jmBfD8SbHZw%40mail.gmail.com.

Xiangyu Wang

unread,
Mar 24, 2026, 10:15:16 AM (yesterday) Mar 24
to zoter...@googlegroups.com
Yes I just tested and indeed it doesn't work.

Reply all
Reply to author
Forward
0 new messages