This commit is contained in:
j3d1 2024-06-06 23:05:21 +02:00
parent 02b620401a
commit c4b12928eb
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@ export default {
methods: {
rawhtml(value) {
if (typeof this.format === 'function') {
return this.format(value).replace(/ /g, ' ');
return this.format(value.replace(/ /g, ' '));
} else {
return value;
}

View file

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