# Reftagger theme component

**URL:** https://meta.discourse.org/t/reftagger-theme-component/163544
**Category:** Theme component
**Created:** [September 9, 2020, 7:31pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544 "2020-09-09T19:31:06Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [September 9, 2020, 7:31pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/1 "2020-09-09T19:31:06Z")

</div>

The Reftagger library allows you to convert bible references on your Discourse forum into links with a hover-preview.

By request of @outofthebox we made a theme component based on [this code](https://meta.discourse.org/t/javascript-in-theme-component-only-runs-once/106202/7).

I’ve added a setting that allows you to select the translation you want to use, and the component extends the content security policy to allow for the reftagger library to be included.

Repository [here](https://github.com/communiteq/discourse-tc-reftagger).

---

<div class="post-metadata">

### Author: ![outofthebox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/outofthebox/32/83708_2.png) [@outofthebox](https://meta.discourse.org/u/outofthebox)
#### Post date: [September 9, 2020, 7:50pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/2 "2020-09-09T19:50:58Z")

</div>

@RGJ, our community _loves_ this feature. Thank you for developing in a secure and customizable manner. I appreciate your generosity in sharing this work back to the Discourse community.

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [September 9, 2020, 10:01pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/3 "2020-09-09T22:01:49Z")

</div>

We’ve been using that for the last 18 months or so, and it’s worked like a charm. Happy to see it improved and made more easily available!

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [September 10, 2020, 7:28am UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/4 "2020-09-10T07:28:44Z")

</div>

Wow, that’s super cool.

I would love to see a similar component in which custom keywords and previews can be defined.  
That would be super useful to create a glossary for example

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [September 10, 2020, 8:04am UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/5 "2020-09-10T08:04:34Z")

</div>

There is the [auto abbrify words](https://meta.discourse.org/t/add-abbr-tags-to-words-in-posts/88394) theme component which does such a thing.

---

<div class="post-metadata">

### Author: ![outofthebox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/outofthebox/32/83708_2.png) [@outofthebox](https://meta.discourse.org/u/outofthebox)
#### Post date: [September 10, 2020, 12:24pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/6 "2020-09-10T12:24:14Z")

</div>

> [@jtbayly](#):
>
> We’ve been using that for the last 18 months or so, and it’s worked like a charm. Happy to see it improved and made more easily available!

I really appreciate you and everyone who contributed to the original conversation on Meta about how to make this feature work!

---

<div class="post-metadata">

### Author: ![smileypants707](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smileypants707/32/129984_2.png) [@smileypants707](https://meta.discourse.org/u/smileypants707)
#### Post date: [August 28, 2021, 8:27pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/7 "2021-08-28T20:27:16Z")

</div>

Hello everyone, Reftagger was working swimmingly for a few months, and then it just stopped. It will still automatically generate an external link for the book/chapter/verse format, but it will not load the hover preview.

 ![Screenshot 2021-08-28 132207](https://global.discourse-cdn.com/meta/original/3X/4/5/45d78859c6a23c2dcffa52b1e7fd0c9d9699e0fe.png)

It appears to be up to date too. Any ideas?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [August 29, 2021, 8:58am UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/8 "2021-08-29T08:58:38Z")

</div>

What Discourse version are you running?

---

<div class="post-metadata">

### Author: ![smileypants707](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smileypants707/32/129984_2.png) [@smileypants707](https://meta.discourse.org/u/smileypants707)
#### Post date: [August 29, 2021, 9:18am UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/9 "2021-08-29T09:18:05Z")

</div>

How can I find this info?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [August 29, 2021, 9:29am UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/10 "2021-08-29T09:29:44Z")

</div>

It should be somewhere in the admin dashboard at `/admin`

---

<div class="post-metadata">

### Author: ![smileypants707](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smileypants707/32/129984_2.png) [@smileypants707](https://meta.discourse.org/u/smileypants707)
#### Post date: [August 29, 2021, 9:32am UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/11 "2021-08-29T09:32:54Z")

</div>

It just says that it is up to date:

 ![Image 111](https://global.discourse-cdn.com/meta/original/3X/7/f/7f1148bd94176296d8d7092e6b26ee1fdb51f333.png)

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [August 29, 2021, 4:32pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/12 "2021-08-29T16:32:07Z")

</div>

Seems to be working fine on Discourse 2.7.7 (at least in Safari) for me.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [August 29, 2021, 9:08pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/13 "2021-08-29T21:08:38Z")

</div>

It’s working again now.  
Reftagger apparently switched to a different CDN (`reftagger.bibliacdn.com`) which had to be whitelisted in the content security policy. I have added it and pushed a new version of the theme component. All you need to do is update the component.

---

<div class="post-metadata">

### Author: ![smileypants707](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smileypants707/32/129984_2.png) [@smileypants707](https://meta.discourse.org/u/smileypants707)
#### Post date: [August 30, 2021, 5:27am UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/14 "2021-08-30T05:27:38Z")

</div>

There it is, thank you sir 🙂

---

<div class="post-metadata">

### Author: ![BrianC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brianc/32/487568_2.png) [@BrianC](https://meta.discourse.org/u/BrianC)
#### Post date: [July 29, 2025, 7:12pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/15 "2025-07-29T19:12:02Z")

</div>

Hey Richard,

Kicking the tires on an older thread. I installed this them component and two things are going on.

First is the message that component needs updating.  
**[Admin Notice]** Theme [‘Reftagger’](https://community.victoriouschristians.com/admin/customize/themes/89?safe_mode=no_themes) contains code which needs updating. (id:discourse.script-tag-discourse-plugin) (_[learn more](https://meta.discourse.org/t/366482)_)

Second may be related to the first notice where the component needs updating. References are not being tagged and pages seem to hand showing the loading circle in the browser tab.

Would it be possible to have this component updated?

---

<div class="post-metadata">

### Author: ![BrianC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brianc/32/487568_2.png) [@BrianC](https://meta.discourse.org/u/BrianC)
#### Post date: [July 30, 2025, 11:42pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/16 "2025-07-30T23:42:18Z")

</div>

I made some headway with this using ChatGPT and have working reftaggers for both using Logos RefTagger and Blue Letter Bible.

If these could be bundled into a theme component for community use that is great if not the theme component is simply to make. You just need to take the code for whichever you prefer and put in the JS tab of a new theme component. You need to remove the default code is in the JS tab from Discourse.

If anyone has feedback how to improve that is welcome. My skills only go as far as guiding the LLM.

using **Logos RefTagger** :

> import { apiInitializer } from “discourse/lib/api”;  
> import loadScript from “discourse/lib/load-script”;
> 
> export default apiInitializer(“0.1”, (api) =\> {  
> // 1. Define RefTagger settings on window BEFORE loading the script  
> window.refTagger = {  
> settings: {  
> bibleVersion: “ESV”, // e.g. default Bible version  
> tagChapters: true, // tag chapter references as well  
> convertHyperlinks: false, // don’t retag existing links  
> roundCorners: true,  
> socialSharing: ,  
> }  
> };
> 
> // 2. Hook into Discourse post rendering:  
> api.decorateCooked((element) =\> {  
> // Load the external RefTagger script (if not already loaded)  
> loadScript(“[https://api.reftagger.com/v2/RefTagger.js”](https://api.reftagger.com/v2/RefTagger.js%E2%80%9D)).then(() =\> {  
> // Run the tagging on the new content element  
> window.refTagger.tag(element);  
> });  
> });  
> });

**using BLB ScriptTagger:**

> import { apiInitializer } from “discourse/lib/api”;  
> import loadScript from “discourse/lib/load-script”;
> 
> export default apiInitializer(“0.1”, (api) =\> {  
> // Optionally set BLB ScriptTagger settings before loading (defaults shown)  
> window.BLB ||= {}; // ensure global BLB object exists  
> window.BLB.Tagger ||= {};  
> window.BLB.Tagger.Translation = “NKJV”; // default translation version  
> window.BLB.Tagger.HyperLinks = “all”; // tag even already-linked refs  
> window.BLB.Tagger.TargetNewWindow = true; // links open in new tab  
> // … (other settings like DarkTheme, etc., as needed)
> 
> api.decorateCooked((elem) =\> {  
> loadScript(“[https://www.blueletterbible.org/assets/scripts/blbToolTip/BLB\_ScriptTagger-min.js”](https://www.blueletterbible.org/assets/scripts/blbToolTip/BLB_ScriptTagger-min.js%E2%80%9D))  
> .then(() =\> {  
> if (window.BLB && window.BLB.Tagger) {  
> window.BLB.Tagger.pageInit(); // re-scan new content for verses:contentReference[oaicite:6]{index=6}  
> }  
> });  
> });  
> });

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [October 2, 2025, 11:19am UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/17 "2025-10-02T11:19:07Z")

</div>

> [@BrianC](#):
>
> First is the message that component needs updating.  
> **[Admin Notice]** Theme [‘Reftagger’](https://community.victoriouschristians.com/admin/customize/themes/89?safe_mode=no_themes) contains code which needs updating. (id:discourse.script-tag-discourse-plugin) (_[learn more](https://meta.discourse.org/t/366482)_)

This has been resolved now.

> [@BrianC](#):
>
> Second may be related to the first notice where the component needs updating. References are not being tagged and pages seem to hand showing the loading circle in the browser tab.

This I cannot reproduce, even before resolving the above issue - which was merely a warning, not an error.

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [October 2, 2025, 7:26pm UTC](https://meta.discourse.org/t/reftagger-theme-component/163544/18 "2025-10-02T19:26:23Z")

</div>

Very grateful for the update!
