I was hoping to use the auto-replace to take concept words and phrases and auto-link them to topics. Like
EFT Tapping
would link to a topic on that. However, if I use markdown or HTML in the replacement text, it ends up being visible – not rendered.
Did I miss something? Or does the replace with a link really mean that the word google would be replaced with the link:
If you want search google you can
can become
If you want to search https://google.com you can
but can’t become
If you want to search google you can
Am I correct?
Thanks!
4 Likes
Hi,
Have you tried using this theme component?
What this does?
Allows you to automatically hyperlink certain words or patterns in your post with desired destination URL.
How to configure?
After importing the theme component, configure the theme settings with the format
WORD, https://destination.url.com
or using regular expressions (in JavaScript implementation ) with the format
/regex/, https://destination.url.com
One item per line
[theme_settings]
Using regular expressions
With regular expressions, you can match a certain pattern …
1 Like
Thank you. That does work! There is a reply there which said they thought it was going to be included in Discourse Core, so I checked:
/admin/customize/watched_words/action/replace
If I just enter the word and then just put the URL without any markdown, it works! So that is how to get it to work without the autolink theme component.
Thanks for the heads up!
Rick
You don’t need a theme component, this is a built in feature of Discourse now.
Admin → Customize → Watched Words → Replace