# More efficient (inline) template usage

**URL:** https://meta.discourse.org/t/more-efficient-inline-template-usage/278757
**Category:** Feature
**Tags:** templates
**Created:** [September 12, 2023, 4:16pm UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757 "2023-09-12T16:16:27Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![BryanV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bryanv/32/226479_2.png) [@BryanV](https://meta.discourse.org/u/BryanV)
#### Post date: [September 12, 2023, 4:16pm UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/1 "2023-09-12T16:16:27Z")

</div>

I would like the ability to paste replies “inline” i.e. in the middle of a sentence. I had requested this for the previous other plugin, and there was some (seemingly positive) discussion about it, but I have not been able to locate that previous discussion.

I _very often_ need to craft replies that have e.g. [GitHub Issue](https://github.com/bokeh/bokeh/issues) in the middle of a sentence:

- If you’d like to request [thing] as a new feature, please open a [GitHub Issue](https://github.com/bokeh/bokeh/issues)
- [Feature] is under-documented, a [GitHub Issue](https://github.com/bokeh/bokeh/issues) would be appropriate to increasing visibility.
- [Some behavior] seems to be a bug, please open [GitHub Issue](https://github.com/bokeh/bokeh/issues) with full details.

I have lots of these kinds of snippets, and use them constantly in our user support forum.

Generically, I’d like to be able to insert templates right exactly at the current cursor position. \[1\] It’s really annoying to have the template get inserted on a newline with another newline above it, and have to manually delete all that whitespace just to get it back up to the previous cursor position, _several times every day_. I just want to type my reply as fast as possible.

Even better would be a _text-only_ way to insert these without having to use any mouse/menu interactions at all.

* * *

1. I woud argue that the entire benefit of using the category posts to store templates is that it can afford full control. Just insert the template at the cursor position exactly, as-is. If whitespace/newlines are desired, they are easily added _in the template editor_—there’s no need to force decisions on us.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 12, 2023, 4:45pm UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/2 "2023-09-12T16:45:44Z")

</div>

> [@BryanV](#):
>
> Even better would be a _text-only_ way to insert these without having to use any mouse/menu interactions at all.

Watched Words/Replace might help you out. It’s how things like [standard install](https://meta.discourse.org/t/142537?silent=true) automatically get linked. When I tried to replace with a markdown link, though, the raw markdown gets inserted into the post, so it’s not quite what yuo want, I’m afraid.

Oh, but if all you want is for Github Issue to get linked, that works already.

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/2/1/2217e21b492c6e6f066c4a1342fabb217f715b6f.png)

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/7/1/671a5d4293c08e5e5578f3dabbf16ca0fe285d72.png)

---

<div class="post-metadata">

### Author: ![BryanV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bryanv/32/226479_2.png) [@BryanV](https://meta.discourse.org/u/BryanV)
#### Post date: [September 12, 2023, 5:10pm UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/3 "2023-09-12T17:10:41Z")

</div>

I gave “GitHub Issue” link as a simple motivating example, but it is only one of several various. There are also snippets that are full sentences that I might insert in a larger paragraph, e.g. as part of a reply explaining why a different forum is more appropriate.

I also wouldn’t want every instance of “GitHub Issue” to link to our tracker unconditionally and unpreventably. 95% of the time it’s what is desired, but there are certainly times that people need to talk about GitHub Issues on other trackers, and not being able to prevent a replacement in places where it would be wrong is arguably worse.

Ultimately I just don’t understand the need to force a particular behaviour here, when the post editor already provides all the tools for anyone to to whatever they want or need. Adding in arbitrary out-of-band whitespace only serves to reduce the scope of functionality.

---

<div class="post-metadata">

### Author: ![BryanV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bryanv/32/226479_2.png) [@BryanV](https://meta.discourse.org/u/BryanV)
#### Post date: [May 6, 2024, 11:12pm UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/4 "2024-05-06T23:12:16Z")

</div>

As this continues to be a near daily annoyance for me, I have to ask if there is some other, better way or place to request features?

Given that the editor itself affords all the ability needed to include newlines (or not), then just inserting the editor text without any modification at all would afford _everyone_ a way to get what they need. I truly do not understand why the utility of relying on the editor for templates is artificially undermined by arbitrarily and unavoidably introducing things _outside_ the editor texts.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [May 10, 2024, 3:55am UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/5 "2024-05-10T03:55:08Z")

</div>

Are you self hosted? If so there is a plugin called templates

> [@Discourse Templates](https://meta.discourse.org/t/discourse-templates/229250):
>
> discourse2Summary Discourse Templates allows the creation of content templates for repeated use. The templates are stored as topics in a special category, where they can be edited and discussed as needed.open_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.information_source This plugin is pretty much a new version of [Discourse Canned Replies](https://meta.discourse.org/t/discourse-canned-replies/48296) but it is more flexible and stores the templates in a differen…

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [May 10, 2024, 3:59am UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/6 "2024-05-10T03:59:14Z")

</div>

Another option would be to fork and modify the eBay Affiliates theme component to check if poster is in support group or is say you and replace keywords with your appropriate link

One benefit to forking is you could create a support short hand code to auto replace with a link or say a paragraph as you mentioned.

---

<div class="post-metadata">

### Author: ![Qwerty8](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/qwerty8/32/329159_2.png) [@Qwerty8](https://meta.discourse.org/u/Qwerty8)
#### Post date: [May 10, 2024, 4:13am UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/7 "2024-05-10T04:13:11Z")

</div>

I believe the OP _is_ using that plugin. They just don’t like that the plugin auto-inserts a couple of new lines.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [May 10, 2024, 4:20am UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/8 "2024-05-10T04:20:50Z")

</div>

Thanks missed that. The 2nd option posted could work as that component is designed to modify eBay links with an affiliate modded link with disclaimer.

So if retooled to check post author against group or user in theory might be a very sweet way of accomplishing the goal and even improve on the idea via short codes to speed things up.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 10, 2024, 6:16am UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/9 "2024-05-10T06:16:27Z")

</div>

> [@BryanV](#):
>
> have to ask if there is some other, better way or place to request features?

Here is the place. 👍 This is where our product and dev teams collect and review suggestions to decide which to prioritise in any given cycle.

Generally, the more people who desire a feature and contribute to/engage with/support the #Contribute > Feature request the higher its chances of being allocated some dev time.

Some feature requests can take awhile to pick up steam depending on how widely they resonate.

---

<div class="post-metadata">

### Author: ![BryanV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bryanv/32/226479_2.png) [@BryanV](https://meta.discourse.org/u/BryanV)
#### Post date: [May 10, 2024, 4:56pm UTC](https://meta.discourse.org/t/more-efficient-inline-template-usage/278757/10 "2024-05-10T16:56:55Z")

</div>

> [@Qwerty8](#):
>
> I believe the OP _is_ using that plugin. They just don’t like that the plugin auto-inserts a couple of new lines.

That is correct. Adding arbitrary unconditional newlines to a template that is already capable of expressing newlines wherever desired only serves to _strictly reduce_ the available functionality.
