# \#plugin-api

**URL:** https://meta.discourse.org/tag/plugin-api/328.md

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

---

## [Using the JS API](https://meta.discourse.org/t/using-the-js-api/41281)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 18\
**Last updated:** [January 30, 2026, 7:30am UTC](https://meta.discourse.org/t/using-the-js-api/41281 "2026-01-30T07:30:33Z")

</div>

Discourse’s JavaScript API allows themes and plugins to make extensive customizations to the user experience. The simplest way to use it is to create a new theme from the admin panel, click “Edit Code”, and then head to …

---

## [Is using type: group in plugins no longer working?](https://meta.discourse.org/t/type-group/405487)

<div class="topic-metadata">

**Author:** [@singi2016cn](https://meta.discourse.org/u/singi2016cn)\
**Replies:** 7\
**Last updated:** [June 17, 2026, 1:09pm UTC](https://meta.discourse.org/t/type-group/405487 "2026-06-17T13:09:35Z")

</div>

Has \`type: group\` become obsolete in plugins? I tried using it in a plugin, but it doesn't work. The input field behaves like \`text\` instead of the expected \`select\`. Has \`type: group\` been deprecated? \`\`\`yaml quectel\_online\_customer\_general\_customer\_group\_id: default: "" type: group client: true \`\`\`

---

## [Extending chat message blocks](https://meta.discourse.org/t/extending-chat-message-blocks/405006)

<div class="topic-metadata">

**Author:** [@Anton\_Akhmerov](https://meta.discourse.org/u/Anton_Akhmerov)\
**Replies:** 2\
**Last updated:** [June 16, 2026, 5:41pm UTC](https://meta.discourse.org/t/extending-chat-message-blocks/405006 "2026-06-16T17:41:09Z")

</div>

Hi all, I would like to develop a plugin for displaying GitLab/GitHub activity notifications in Discourse Chat, or more broadly any kind of regular events. For a richer output I would like to display activity as a card…

---

## [Plugin "Duplicate export" error after Discourse update](https://meta.discourse.org/t/plugin-duplicate-export-error-after-discourse-update/398882)

<div class="topic-metadata">

**Author:** [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)\
**Replies:** 3\
**Last updated:** [March 20, 2026, 4:38pm UTC](https://meta.discourse.org/t/plugin-duplicate-export-error-after-discourse-update/398882 "2026-03-20T16:38:16Z")

</div>

Updating to 2026.3.0-latest has broken my plugin again. Can anyone help explain what is wrong? I see this error in the F12 console in Chrome: app.js:73 Failed to load plugin discourse-directoryopus from https://resour…

---

## [What does api.addSaveableUserOptionField do?](https://meta.discourse.org/t/what-does-api-addsaveableuseroptionfield-do/381049)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Replies:** 4\
**Last updated:** [February 9, 2026, 5:00pm UTC](https://meta.discourse.org/t/what-does-api-addsaveableuseroptionfield-do/381049 "2026-02-09T17:00:44Z")

</div>

There’s virtually no documentation on this, and the plugin API file doesn’t have a comment explaining the use of this function. Plus, the only place I can see it used is in plugins, not in core. So what does api.addSavea…

---

## [Observer on "controller:edit-category.tabs" model not triggered](https://meta.discourse.org/t/observer-on-controller-edit-category-tabs-model-not-triggered/385559)

<div class="topic-metadata">

**Author:** [@pirhoo](https://meta.discourse.org/u/pirhoo)\
**Replies:** 2\
**Last updated:** [October 20, 2025, 12:31pm UTC](https://meta.discourse.org/t/observer-on-controller-edit-category-tabs-model-not-triggered/385559 "2025-10-20T12:31:05Z")

</div>

Hello, I’m trying to observe changes to the model of the EditCategoryTabs controller but for some reasons, nothing happens: import { observes } from "@ember-decorators/object" import { withPluginApi } from "discourse/l…

---

## [Does api.decorateCookedElement appear in search results?](https://meta.discourse.org/t/does-api-decoratecookedelement-appear-in-search-results/377818)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Replies:** 4\
**Last updated:** [August 8, 2025, 9:52am UTC](https://meta.discourse.org/t/does-api-decoratecookedelement-appear-in-search-results/377818 "2025-08-08T09:52:47Z")

</div>

Basically the title. Does content added via api.decorateCookedElement() appear in sesrch results?

---

## [Syncing Jira Status Back to Discourse?](https://meta.discourse.org/t/syncing-jira-status-back-to-discourse/360724)

<div class="topic-metadata">

**Author:** [@jaeni](https://meta.discourse.org/u/jaeni)\
**Replies:** 1\
**Last updated:** [April 29, 2025, 7:05am UTC](https://meta.discourse.org/t/syncing-jira-status-back-to-discourse/360724 "2025-04-29T07:05:21Z")

</div>

Hi. I’m setting up a workflow where Discourse posts automatically create tickets in our internal Jira when a user submits a new topic. I know Discourse supports this functionality. However, I’m wondering—if we update t…

---

## [New plugin outlet for topic timers?](https://meta.discourse.org/t/new-plugin-outlet-for-topic-timers/363833)

<div class="topic-metadata">

**Author:** [@jordan-violet](https://meta.discourse.org/u/jordan-violet)\
**Replies:** 1\
**Last updated:** [April 28, 2025, 4:35pm UTC](https://meta.discourse.org/t/new-plugin-outlet-for-topic-timers/363833 "2025-04-28T16:35:12Z")

</div>

Would it be possible to have a plugin outlet added for topic timers?

---

## [Send mail and push notifications using ajax method](https://meta.discourse.org/t/send-mail-and-push-notifications-using-ajax-method/293890)

<div class="topic-metadata">

**Author:** [@omppatil](https://meta.discourse.org/u/omppatil)\
**Replies:** 1\
**Last updated:** [April 23, 2025, 8:51am UTC](https://meta.discourse.org/t/send-mail-and-push-notifications-using-ajax-method/293890 "2025-04-23T08:51:11Z")

</div>

Hi!, I’m developing a plugin in which it has a button which can hide and unhide post/topic,now what I want to know is that is there any ajax method using JavaScript to send email and push notifications to all the users/…

---

## [Best way to upload Images to a plugin/theme?](https://meta.discourse.org/t/best-way-to-upload-images-to-a-plugin-theme/360581)

<div class="topic-metadata">

**Author:** [@bitmage](https://meta.discourse.org/u/bitmage)\
**Replies:** 3\
**Last updated:** [April 6, 2025, 9:48pm UTC](https://meta.discourse.org/t/best-way-to-upload-images-to-a-plugin-theme/360581 "2025-04-06T21:48:21Z")

</div>

I would like to upload image icons as a part of my theme or plugin (I use both). I will then be referring to them from a glimmer component in the plugin. I need to be able to get the string URL of the image location, b…

---

## [Another way to track nested data structures](https://meta.discourse.org/t/another-way-to-track-nested-data-structures/357978)

<div class="topic-metadata">

**Author:** [@bitmage](https://meta.discourse.org/u/bitmage)\
**Replies:** 2\
**Last updated:** [March 19, 2025, 3:33pm UTC](https://meta.discourse.org/t/another-way-to-track-nested-data-structures/357978 "2025-03-19T15:33:42Z")

</div>

@tracked state of an array or object within a glimmer component does not trigger updates when you change a member of the array/object. This topic talks about some options to get your view to properly update. I wanted t…

---

## [Discourse-ip-alert: Need help with created plugin](https://meta.discourse.org/t/discourse-ip-alert-need-help-with-created-plugin/357738)

<div class="topic-metadata">

**Author:** [@OrkoGrayskull](https://meta.discourse.org/u/OrkoGrayskull)\
**Replies:** 0\
**Last updated:** [March 18, 2025, 12:31pm UTC](https://meta.discourse.org/t/discourse-ip-alert-need-help-with-created-plugin/357738 "2025-03-18T12:31:22Z")

</div>

This plugin is intended to send an email alert to all administrators whenever a user logs in from a suspicious IP address. It does so by extracting the IP from the latest authentication token (using the client\_ip field),…

---

## [Add a block of jobs to the daily digest that is relevant to user based on settings in their profile](https://meta.discourse.org/t/add-a-block-of-jobs-to-the-daily-digest-that-is-relevant-to-user-based-on-settings-in-their-profile/352361)

<div class="topic-metadata">

**Author:** [@Elizeo\_Rocha](https://meta.discourse.org/u/Elizeo_Rocha)\
**Replies:** 2\
**Last updated:** [February 15, 2025, 7:36am UTC](https://meta.discourse.org/t/add-a-block-of-jobs-to-the-daily-digest-that-is-relevant-to-user-based-on-settings-in-their-profile/352361 "2025-02-15T07:36:54Z")

</div>

The idea is to add a block of jobs to the daily digest that is relevant to users based on settings in their profile. My first idea is to develop a plugin where I could access and modify the digest email and include the b…

---

## [Updated Custom Header Icon: Post Data via URL](https://meta.discourse.org/t/updated-custom-header-icon-post-data-via-url/325174)

<div class="topic-metadata">

**Author:** [@littleviolette](https://meta.discourse.org/u/littleviolette)\
**Replies:** 5\
**Last updated:** [February 12, 2025, 8:05pm UTC](https://meta.discourse.org/t/updated-custom-header-icon-post-data-via-url/325174 "2025-02-12T20:05:26Z")

</div>

Discourse has recently deprecated api.decorateWidget, which I used to insert custom header icons and post the current user’s username via a URL. I was wondering how I can post the user’s current username via HTTP with t…

---

## [Error "Unable to configure link to 'Auto Send Messages'. Ensure ad-blockers are disabled and try reloading the page."](https://meta.discourse.org/t/error-unable-to-configure-link-to-auto-send-messages-ensure-ad-blockers-are-disabled-and-try-reloading-the-page/350938)

<div class="topic-metadata">

**Author:** [@Xavier\_Garzon](https://meta.discourse.org/u/Xavier_Garzon)\
**Replies:** 9\
**Last updated:** [February 11, 2025, 2:36am UTC](https://meta.discourse.org/t/error-unable-to-configure-link-to-auto-send-messages-ensure-ad-blockers-are-disabled-and-try-reloading-the-page/350938 "2025-02-11T02:36:47Z")

</div>

I’m trying to add a simple tab to use my new plugin but I get the following error message: Unable to configure link to ‘Auto Send Messages’. Ensure ad-blockers are disabled and try reloading the page. This new plugi…

---

## [Gem::MissingSpecError for plugin gem dependency](https://meta.discourse.org/t/gem-missingspecerror-for-plugin-gem-dependency/351490)

<div class="topic-metadata">

**Author:** [@lllukom](https://meta.discourse.org/u/lllukom)\
**Replies:** 3\
**Last updated:** [February 10, 2025, 9:24pm UTC](https://meta.discourse.org/t/gem-missingspecerror-for-plugin-gem-dependency/351490 "2025-02-10T21:24:49Z")

</div>

I’ve created some plugin for Discourse and added a gem dependency in plugin.rb like this: gem 'faraday-multipart', '1.1.0', require\_name: 'faraday/multipart' then referenced this plugin in app.yml and performed launche…

---

## [Question about Docker Manager?](https://meta.discourse.org/t/question-about-docker-manager/348286)

<div class="topic-metadata">

**Author:** [@AEW745](https://meta.discourse.org/u/AEW745)\
**Replies:** 17\
**Last updated:** [January 24, 2025, 4:23pm UTC](https://meta.discourse.org/t/question-about-docker-manager/348286 "2025-01-24T16:23:12Z")

</div>

Does Docker manager come with Core plugins? If so, does disabling it allow me to fork core plugins and add my own features? Let me know. Thanks!

---

## [How do I use api.registerTopicFooterButton?](https://meta.discourse.org/t/how-do-i-use-api-registertopicfooterbutton/346651)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Replies:** 2\
**Last updated:** [January 12, 2025, 12:40am UTC](https://meta.discourse.org/t/how-do-i-use-api-registertopicfooterbutton/346651 "2025-01-12T00:40:40Z")

</div>

As mentioned in: What do I put in action, if I wish to register a DButton there, that perhaps does an action as specified in the DButton’s @action?

---

## [Add custom markdown quote bbcode tags](https://meta.discourse.org/t/add-custom-markdown-quote-bbcode-tags/345910)

<div class="topic-metadata">

**Author:** [@ego-lay\_atman-bay](https://meta.discourse.org/u/ego-lay_atman-bay)\
**Replies:** 3\
**Last updated:** [January 8, 2025, 2:16am UTC](https://meta.discourse.org/t/add-custom-markdown-quote-bbcode-tags/345910 "2025-01-08T02:16:06Z")

</div>

I am developing a discourse extension to display snapblocks. I was able to add bbcode tags that get replaced with the blocks, unfortunately if you select to quote the blocks, you get the text in the block in a code block…

---

## [api.registerValueTransformer: transformer "post-menu-buttons" is unknown and will be ignored](https://meta.discourse.org/t/api-registervaluetransformer-transformer-post-menu-buttons-is-unknown-and-will-be-ignored/345461)

<div class="topic-metadata">

**Author:** [@ishua\_wang](https://meta.discourse.org/u/ishua_wang)\
**Replies:** 1\
**Last updated:** [January 4, 2025, 3:37am UTC](https://meta.discourse.org/t/api-registervaluetransformer-transformer-post-menu-buttons-is-unknown-and-will-be-ignored/345461 "2025-01-04T03:37:30Z")

</div>

Hello, I install discourse and find a minor issue. What’s the problem? Could this be fixed?

---

## [Support for BlockedSerializationError when I add a field named type\_tag to the tags table](https://meta.discourse.org/t/support-for-blockedserializationerror-when-i-add-a-field-named-type-tag-to-the-tags-table/326323)

<div class="topic-metadata">

**Author:** [@tudinhtu98](https://meta.discourse.org/u/tudinhtu98)\
**Replies:** 0\
**Last updated:** [September 13, 2024, 8:25am UTC](https://meta.discourse.org/t/support-for-blockedserializationerror-when-i-add-a-field-named-type-tag-to-the-tags-table/326323 "2024-09-13T08:25:47Z")

</div>

I am using Discourse version 3.4.0.beta2-dev. After adding a field named type\_tag to the tags table, I encountered the error: ActiveRecordSerializationSafety::BlockedSerializationError in ListController#latest Serial…

---

## [Request for a plugin outlet between the editor and preview](https://meta.discourse.org/t/request-for-a-plugin-outlet-between-the-editor-and-preview/306358)

<div class="topic-metadata">

**Author:** [@Alteras](https://meta.discourse.org/u/Alteras)\
**Replies:** 1\
**Last updated:** [May 10, 2024, 10:38pm UTC](https://meta.discourse.org/t/request-for-a-plugin-outlet-between-the-editor-and-preview/306358 "2024-05-10T22:38:54Z")

</div>

I’m trying to make a theme component where the user can adjust the sizing of the preview/editor in the composer. Ideally this would be as an dragbar element that the user would drag around. For that, could a plugin outl…

---

## [Using api from custom component](https://meta.discourse.org/t/using-api-from-custom-component/304641)

<div class="topic-metadata">

**Author:** [@gar1t](https://meta.discourse.org/u/gar1t)\
**Replies:** 2\
**Last updated:** [April 19, 2024, 4:58pm UTC](https://meta.discourse.org/t/using-api-from-custom-component/304641 "2024-04-19T16:58:27Z")

</div>

I’m trying to access the api from a custom component with this snipped in the html body: \<script type="text/discourse-plugin" version="0.8"\> console.log("###########", api.getCurrentUser()); \</script\> This snippet ho…

---

## [Add new action in rails controller](https://meta.discourse.org/t/add-new-action-in-rails-controller/298157)

<div class="topic-metadata">

**Author:** [@maaatt](https://meta.discourse.org/u/maaatt)\
**Replies:** 7\
**Last updated:** [March 6, 2024, 3:05pm UTC](https://meta.discourse.org/t/add-new-action-in-rails-controller/298157 "2024-03-06T15:05:54Z")

</div>

I’m building a plugin to add new exports in the users section. Instead to add new controller for every export I would like to extend the ExportCsvController and add new actions to it. How can I achieve this? Thanks

---

## [Opening the login form with onclick in a theme component](https://meta.discourse.org/t/opening-the-login-form-with-onclick-in-a-theme-component/275464)

<div class="topic-metadata">

**Author:** [@kuaza](https://meta.discourse.org/u/kuaza)\
**Replies:** 3\
**Last updated:** [August 23, 2023, 5:14pm UTC](https://meta.discourse.org/t/opening-the-login-form-with-onclick-in-a-theme-component/275464 "2023-08-23T17:14:46Z")

</div>

I searched a lot before posting but couldn’t find it. I am changing this theme component a little and adding a new topic creation button. And I want non-login users to open the login area when they click the button. The …

---

## [Add the ability to create your own dropdown menu and add custom items in the composer](https://meta.discourse.org/t/add-the-ability-to-create-your-own-dropdown-menu-and-add-custom-items-in-the-composer/273049)

<div class="topic-metadata">

**Author:** [@tyler-mairose-sp](https://meta.discourse.org/u/tyler-mairose-sp)\
**Replies:** 0\
**Last updated:** [July 27, 2023, 2:10pm UTC](https://meta.discourse.org/t/add-the-ability-to-create-your-own-dropdown-menu-and-add-custom-items-in-the-composer/273049 "2023-07-27T14:10:07Z")

</div>

Hello! I recently asked this question over in the Development category. I would like to request the feature be added to the plugin api with the ability to add your own custom dropdown menu with items. The closest I w…

---

## [baseURI not valid in decorateCooked](https://meta.discourse.org/t/baseuri-not-valid-in-decoratecooked/250624)

<div class="topic-metadata">

**Author:** [@markschmucker](https://meta.discourse.org/u/markschmucker)\
**Replies:** 2\
**Last updated:** [January 3, 2023, 10:27pm UTC](https://meta.discourse.org/t/baseuri-not-valid-in-decoratecooked/250624 "2023-01-03T22:27:55Z")

</div>

api.decorateCooked($elem =\> { var uri = $elem\[0\].baseURI; }); uri is not consistent. It has one of the following values, with about equal frequency. https://forum.example.com/t/test-topic-1/43803 (expected behavio…

---

## [How to get topic slug or id from PluginAPI?](https://meta.discourse.org/t/how-to-get-topic-slug-or-id-from-pluginapi/250362)

<div class="topic-metadata">

**Author:** [@markschmucker](https://meta.discourse.org/u/markschmucker)\
**Replies:** 0\
**Last updated:** [January 2, 2023, 3:37am UTC](https://meta.discourse.org/t/how-to-get-topic-slug-or-id-from-pluginapi/250362 "2023-01-02T03:37:46Z")

</div>

PluginAPI newbie here. I have a working script something like: api.decorateCooked($elem =\> { var iframes = $elem\[0\].querySelectorAll('iframe'); var uri = $elem\[0\].baseURI; // modify the iframes in a way that…

---

## [How to find a tag using the plugin-api](https://meta.discourse.org/t/how-to-find-a-tag-using-the-plugin-api/238209)

<div class="topic-metadata">

**Author:** [@attj](https://meta.discourse.org/u/attj)\
**Replies:** 2\
**Last updated:** [September 17, 2022, 10:04am UTC](https://meta.discourse.org/t/how-to-find-a-tag-using-the-plugin-api/238209 "2022-09-17T10:04:13Z")

</div>

I have the following import statement in my code (javascript side): import Tag from "discourse/models/tag"; However, I can’t use it to retrieve a tag object by it’s name. My goal is to obtain the tag description, but I…

[Next page](https://meta.discourse.org/tag/plugin-api/328.md?match_all_tags=true&page=1&tags%5B%5D=plugin-api)
