Can you call an existing tag in a script?


#1

I have been searching everywhere. I thinks it’s possible cannot recall where.


#2

Not sure what you mean by “call an existing tag”…what are you trying to accomplish?


#3

Hi. What I mean is can I call a tag like [[time]], [[line]] into a script like alert([[time]]);


#4

You can obtain a string in which tag references are expanded to the value of each tag by writing something like:

const str = draft.processTemplate(' on [[time]] and in [[line]] ');

alert(str);

#5

Thank you. This helps