惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
U
Unit 42
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 BLOG
IT之家
IT之家
MyScale Blog
MyScale Blog
V
Visual Studio Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
I
InfoQ
博客园 - 司徒正美

Discourse Meta - Latest posts

Horizon: High Context Topic Cards I'd like to ask what this file /var/www/discourse/vendor/data/RT_sRGB.icm is used for? Discourse to Markdown Plugin Testing reply function How to verify a subdomain (mysite.discourse.group) in Google Search Console? Reader Mode Publishing WordPress gallery posts on Discourse Discourse User Feedback New user filter by custom field and contact Interact with discourse from Python? Why we can't type the assignee in the search of a post to assign - home screen app Redis Flushall Category-toggled one-touch move post Some sort of variable to eliminate duplicate text? Why did this plugin replacement fail? Add user to list modal often appears above the mobile viewport sceen Creating/Editing a post on mobile: let's discuss the 2026 Discourse experience Wp-discourse feature request - do not show comments with specific tag? Are there any good Chinese plugins? Discourse ID and 2FA Discourse MCP is here! Sample Forum to See Admin Features? I am unable to register for a free Discourse site Wikipedia Lookup Add text for /login (like js.create_account.disclaimer for /signup) How can i set disable Markdown & Default to Rich Text What's the background image size for the Welcome Banner? How do I enable Associated Accounts with 2FA? Hamburger toggle Support <span data-attribute> in the rich editor
Topic Template Placeholder Text theme component
2026-04-14 · via Discourse Meta - Latest posts

42

Thanks guys, after updating and a hard refresh it is now working as expected!

2 Likes

43

Just started testing this component; thanks! I’d curious about adding Placeholder text to private messages. Has anyone tried that?

44

Private messages have the same default placeholder text as Topic posts. It can be changed by the site administrators under the admin settings Customize > Text. Search for js.composer.reply_placeholder - as shown at the top of this thread.

If you use this component to customise the placeholder text for each Topic Category, the default placeholder text should only apply to the Private Messages.

1 Like

45

This theme component is really cool. I’ve been trying to find a way to give my users a little more guidance when they create a topic, and would like to make the experience more like completing a form.

Right now, this theme component makes it so that all text that is preloaded in a topic is a single placeholder. So, once a user types anything in the topic composer, all of the placeholder text goes away.

Would it be possible to have it so that there are different placeholders on the page? For example, the topic template could load a separate placeholder for:

“Name”


“Location”


“Issue”

So that when the users types in their name, the other placeholders for Location and Issue stay there, until the user types in their spots too?

46

The default Discourse Topic Template Text stays whilst the user is typing. It sounds like that is what you need?

47

The Placeholder Approach:

What I (and others?) would be looking for would behave more like placeholders in a form (meaning with separate form elements).

The basic default behavior now would allow me to list out different sections of the form, like what I wrote (“name”, “location”, and “issue”), but the default template behavior has the same problems as noted before–markdown makes it confusing and user can break it easily.

I think the ideal would be like a normal form, where there is a placeholder for each section (name, location, and issue), but (here’s the difference) the sections would behave independently. So when the user clicks on the name section, the placeholder “name” disappears, but the other sections stay until the user clicks on those too.

I could imagine this being possible (?) with jquery. Each section would have to have its own div with id, and then jquery would allow showing or removing the text of that particular id when the user clicks on it. This would require adding divs into the textarea, however, and I’m not sure how to do that.

I’m investigating that here.

The Template Approach

Probably an alternative would be that the section headers don’t “disappear” when the user clicks. So the section headers (example: Name, Location, and Issue) would be text that would stay on the page. To make it more form-like, compared to the current template default:

  1. The section header text could not be edited by the user (ie, contenteditable="false")
  2. The section break points could not be removed by the user
  3. There would be space below the section header where it’s clear the user can type. In the current default template, they’d have to go to where the text is, hit return, to create space to type.

Perhaps this is the easier way to do it?

48

I found this setting only apply on first post not working.
It doesn’t work if I want all posts in a topic have the same placeholder and deactivate the setting. I get a standard placeholder in this case.

49

Any possibility of having a placeholder specific to replies (not the first post in a topic)? I’m hoping to give users more guidance on what can be in a reply, and a placeholder that pops up in a reply would be helpful.

4 Likes

50

I’ve found that this works for replies only if the placeholder text has more than one line. Got no idea why as the code is a bit too complicated for me.

P.S.

While there I’ve dropped in a small PR to stop the browser console warnings:

2 Likes

51

Merged thank you Nathan.

2 Likes

I’m having an issue where Placeholder Text doesn’t appear. What am i missing?

Template:

image

Component Setting

image

No placeholder/template text appears

image

When unticking “Display all your Topic Templates as placeholders”

image

Template appears as editable text (not placeholder text)

image

Edit Template Text it include [placeholder]

image

Template Text disappears/no placeholder text

image

This is on a fresh Discourse install, no plugins/components installed - Discourse 3.4.0

53

Yeah it seems this theme component stop working. :thinking:

3 Likes

54

This component stopped working for me.

Oh well, I can confirm it’s not working. Probably because of major recent changes on Discourse.

1 Like

56

Hi, any hope it’s updated ? :face_with_tongue:

57

Hello :waving_hand:

I’ve created a PR to bring this theme component back to life and make it compatible with the latest Discourse. :slightly_smiling_face:

8 Likes

58

Thanks @Don I’ve merged your pull request. Please test that’s working for you. :folded_hands:

3 Likes

59

I’ve just re-installed and used it - seems to be working well now.

Therefore, I’ve removed the broken tag.

2 Likes

60

[Admin Notice] Theme ‘Topic Template Placeholder Text’ contains code which needs updating. (id:discourse.resolver-resolutions)

[THEME 50 ‘Topic Template Placeholder Text’] DEPRECATION NOTICE: “site:main” is deprecated, use “service:site” instead [deprecated since Discourse 2.9.0.beta7] [deprecation id: discourse.resolver-resolutions]

61

I’ve made that change and issued an update. All should be working now.

2 Likes