SilentVoid13 / Templater

A template plugin for obsidian
https://silentvoid13.github.io/Templater
GNU Affero General Public License v3.0
3.2k stars 194 forks source link

reuse the data obtained from User Script #581

Open LumosLovegood opened 2 years ago

LumosLovegood commented 2 years ago

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.

Zachatoo commented 1 year ago

This is a built in feature using execution commands.

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

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