I have a form that allows a user to draft an SMS template. I'd like to render the SMS using a variable to generate a realistic example. For example, a user may type the following into an input box (say raw-input)
Dear {{context.username}}, Thank you for your contribution of value {{context.amount}}
And in vueJS we have defined the context variable to be used to render the example test.
data() {
return {
render_sms: "",
context: {
amount: "1.00",
first_name: "John",
last_name: "Doe",
}
};
I would like to apply the context to the raw-input to generate something like this in another input box from within vueJS (don't want to call an API service for this)
Dear John, Thank you for your contribution of value 1.00