This commit is contained in:
j3d1 2024-05-22 22:05:03 +02:00
parent 0d231b0e65
commit b15eab9c27

View file

@ -26,7 +26,7 @@ export default {
methods: {
...mapActions(['fetchMessageTemplates', 'fetchMessageTemplateVariables']),
formatText(value) {
return value.replace(/{{(.*?)}}/g, (match, key) => {
return value.replace(/{{(.+?)}}/g, (match, key) => {
return `<span class="text-primary">{{ ${key} }}</span>`;
}).replace(/\n/g, '<br>').replace(/\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;');
}