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

View file

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

View file

@ -28,7 +28,7 @@ export default {
...mapActions(['fetchMessageTemplates', 'fetchMessageTemplateVariables']), ...mapActions(['fetchMessageTemplates', 'fetchMessageTemplateVariables']),
formatText(value) { formatText(value) {
return value.replace(/{{(.+?)}}/g, (match, key) => { 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;'); }).replace(/\n/g, '<br>').replace(/\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;');
}, },
changeMessageTemplate(id, message) { changeMessageTemplate(id, message) {