discourse/app/assets/javascripts/admin/addon/components/admin-watched-word.hbs
Régis Hanol 1eec8c3fa6 FEATURE: add HTML replacements
This adds support for Watched Words to allow replacement with HTML content rather than always replacing with text.

Can be useful when automatically replacing with the '<abbr>' tag for example.

Discussion - https://meta.discourse.org/t/replace-text-with-more-than-just-links/305672
2024-05-14 10:41:27 +02:00

23 lines
580 B
Handlebars

<span
role="button"
onclick={{this.deleteWord}}
class="delete-word-record"
>{{d-icon "times"}}</span>
{{this.word.word}}
{{#if (or this.isReplace this.isLink)}}
&rarr;
<span class="replacement">{{this.word.replacement}}</span>
{{else if this.isTag}}
&rarr;
{{#each this.tags as |tag|}}
<span class="tag">{{tag}}</span>
{{/each}}
{{/if}}
{{#if this.isCaseSensitive}}
<span class="case-sensitive">{{i18n
"admin.watched_words.case_sensitive"
}}</span>
{{/if}}
{{#if this.isHtml}}
<span class="html">{{i18n "admin.watched_words.html"}}</span>
{{/if}}