Templater icon indicating copy to clipboard operation
Templater copied to clipboard

reuse the data obtained from User Script

Open LumosLovegood opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. I want to get object values from my User Script. For example, my script return a bookInfo object, and it contains bookInfo.author, bookInfo.cover and so on. I want to use the contents of object in many places of the template.

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

LumosLovegood avatar Mar 12 '22 13:03 LumosLovegood

This is a built in feature using execution commands.

<%*
let bookInfo = tp.user.myScript();
-%>

<% bookInfo.author %>
<% bookInfo.cover %>

Zachatoo avatar Sep 23 '23 00:09 Zachatoo