0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-11 02:59:07 +08:00
discourse/plugins/discourse-templates
Natalie Tay 500ca0bdb3
DEV: Support topic template category and tag options (#41197)
This adds optional metadata for template topics so the "New topic from
template" button can prefill the new topic composer with a category and
tags.

Template authors can add this block at the start of the first post:

```md
<!-- discourse-template
category: todo
tags: security, minor-security-fix
-->
```

- the block is read from the raw post (there are safe regex limits),
stripped from the composer body, and only accepted when it appears at
the start of the post
- category lookup respects the current user's visibility and create
permissions
- tags continue to go through the existing composer constraints for
tagging permissions, tag limits, staff tags, and server-side validation
2026-06-25 23:05:28 +08:00
..
app DEV: Always pass --force to annotaterb and reorder annotations (#39977) 2026-05-13 14:12:48 +01:00
assets DEV: Support topic template category and tag options (#41197) 2026-06-25 23:05:28 +08:00
config I18N: Update translations (#40165) 2026-05-22 11:36:52 +02:00
db/migrate
lib DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00
spec DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
test/javascripts DEV: Support topic template category and tag options (#41197) 2026-06-25 23:05:28 +08:00
about.json
package.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00
plugin.rb DEV: Remove obsolete register_svg_icon checks (#35067) 2025-09-30 15:51:44 +02:00
README.md
tsconfig.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00

Discourse Templates plugin

This plugin adds support for inserting a template into the composer window via a UI.

For more information please check the Official Plugin Topic & Documentation on Meta.

Installation

Follow the directions at Install a Plugin using https://github.com/discourse/discourse-templates.git as the repository URL.

Previous plugin

Discourse Canned Replies

License

GNU GPL v2