Antwoordsjabloon

The Reply Template is a theme component and not connected to a topic template.

My suggested plugin would work in conjunction with reply templates.

Yep, got that. I was clarifying on the plugin. Basically, it places the desired reply template in the topic post of all topics in a specific category which has the Journal plugin enabled?

1 like

It would be triggered independently of the journal plugin.

Here is my quick and dirty spec sheet:

  • Plugin settings:
    • checkbox: enable ā€œForce reply templateā€ plugin
    • tag picker: enable ā€œForce reply templateā€ for topics with this tag
  • Category settings:
    • checkbox: enable Force reply template in category
  • Condition:
    • If the above conditions are met AND if a reply template is found in first post, THEN enable fill the reply template into the composer after users hits the Reply button
    • Condition does not apply to reply buttons in individual posts
3 likes

When I click the button when not logged in:

You can test yourself here:

What can be the problem?

1 like

@agligorijevic Are you on the latest version of Discourse, and of the Theme Component?

1 like

The component needs an update. I will make a PR.


3 likes

There is a method to use the reply templates automatically (on specific categories)?

2 likes

AFAIK there isn’t. There are only category templates in core.

1 like

I think that this TC does what you are looking for:

2 likes

Thanks Nat, from what I understand (please correct me if I’m wrong) the propose for this plugin is to change the Placeholder text on topics and -not expected- the text still remains in the textbox.

I tried it, and it’s currently not working. If it’s updated, it could work as a workaround, for sure!

1 like

Ik geloof dat deze component enigszins defect is met de nieuwe composer, aangezien [wrap] niet langer wordt ondersteund. Je krijgt deze foutmelding als je een onderwerp bewerkt dat dit heeft gebruikt: Token type ā€˜wrap_open’ not supported by Markdown parser

Is er een oplossing voor bestaande onderwerpen? Onze gebruikers bewerken vaak onderwerpen en dit gaat hen echt verwarren. Ik weet dat je gewoon naar de Markdown-weergave kunt gaan, maar dit overwinnen zal een uitdaging zijn.

Wordt dit bijgewerkt om te werken met de nieuwe composer?

We zijn van plan om ondersteuning voor [wrap] tokens toe te voegen aan de rich text editor, maar het zal enige tijd duren om dit correct te implementeren. Op dit moment hebben we geen ETA. Houd er ook rekening mee dat de jaarlijkse Discourse meetup er binnenkort aankomt, dus veel teamleden zullen afwezig zijn, wat betekent dat het werk aan deze functie de komende weken zal worden gepauzeerd of vertraagd.

Tot die tijd is de beste optie om terug te schakelen naar de markdown composer.

5 likes

Wouldn’t it be quite easy to implement this? Maybe not in a 100% secure way, but more like a 80% solution, where the user does get the template filled in, as the user pressing ā€œreplyā€?

Or will that requires a backend plugin, which does provide the templates as extra context, if the user opened up the topic, and only have pot 40-45 in the viewpoint, resulting in the client haven’t and context about the ā€œalmost forced templateā€ for the topic? :slight_smile:

I’m asking here, as I’m not that familiar with the component structure, but it should be a great addition, as mentioned before.

Hey guys

The issue seems to persists when I try to use insert a template into the new composer. I get error message in a modal: Token type wrap_open not supported by Markdown parser.
tested on 3.6.0beta1

browser console log:

prosemirror-editor.gjs:245 Uncaught Error: Token type `wrap_open` not supported by Markdown parser
    at s.parseTokens (index.js:190:23)
    at d.parse (index.js:331:15)
    at em.convert (parser.js:43:19)
    at eI.convertFromMarkdown (prosemirror-editor.gjs:242:26)
    at q._join (index.js:788:21)
    at q.join (index.js:605:17)
    at p (index.js:152:22)
    at eC.convertFromMarkdown (index.js:250:23)
    at eC.insertBlock (text-manipulation.js:170:22)
    at q (cache-fCezwMOy.js:471:12)
    at r.trigger (evented.js:68:5)
    at #h (d-templates.js:101:1)
    at v.insertTemplate (filterable-list.js:115:1)
    at c.apply (item.js:11:1)
    at d-button.gjs:138:19
    at invoke (index.js:264:14)
    at m.flush (index.js:180:11)
    at g.flush (index.js:334:19)
    at q._end (index.js:762:32)
    at q.end (index.js:565:10)
    at q._runExpiredTimers (index.js:869:12)
parseTokens @ index.js:190
parse @ index.js:331
convert @ parser.js:43
convertFromMarkdown @ prosemirror-editor.gjs:242
_join @ index.js:788
join @ index.js:605
p @ index.js:152
(anonymous) @ index.js:250
insertBlock @ text-manipulation.js:170
q @ cache-fCezwMOy.js:471
trigger @ evented.js:68
#h @ d-templates.js:101
insertTemplate @ filterable-list.js:115
apply @ item.js:11
(anonymous) @ d-button.gjs:138
invoke @ index.js:264
flush @ index.js:180
flush @ index.js:334
_end @ index.js:762
end @ index.js:565
_runExpiredTimers @ index.js:869
setTimeout
setTimeout @ index.js:39
_installTimerTimeout @ index.js:912
_reinstallTimerTimeout @ index.js:896
_later @ index.js:829
later @ index.js:652
T @ index.js:562
_triggerAction @ d-button.gjs:135
click @ d-button.gjs:93

Unfortunately this is a known bug/feature request when using wraps in the new composer.

1 like

Is there any way to modify the Token type wrap_open not supported by Markdown parser message text? Our users are confused,sSo we would like to change the text to make it more clear that they have to switch to the classic markdown editor to use any [wrap] bbcode

@jrgong You just need to update your instance, we’ve since changed that message [1] and it’s now automatically reverted back to the Markdown mode if any unsupported feature is seen in Rich mode.


  1. ā€œThe rich text editor doesn’t support all features used in this post; switching you to the Markdown editor.ā€ ā†©ļøŽ

1 like

Thx, I just tested it on beta2 successfully. But while testing, I found another related bug while testing: