Automatic table of contents

In most cases when using dv.view() I think you should add await in front of it. What other error messages do you get from doing it?

Templater should also work nicely on mobile, but there is a difference between “text” templates from your templates folder, and user functions (in javascript) from the user scripts folder. And those two folders can’t be the same. The latter is called using tp.user.YOUR_NAME() from inside another templater script, or javascript where you’ve got access to tp

CustomJS also do work, when you get the syntax correct, so play around a little more with, and the examples provided, and you’ll surely get it to work too.

In Dataview when I try to call the script with:

 await dv.view("DataviewScripts/moc")

It gives me this error:

Evaluation Error: SyntaxError: Unexpected token '{'
    at new Function (<anonymous>)
    at DataviewInlineApi.view (plugin:dataview:18584:20)
    at async eval (eval at <anonymous> (plugin:dataview), 
<anonymous>:1:55)
    at async DataviewJSRenderer.render (plugin:dataview:18670:13)

Sorry, can you explain this part better which isn’t clear to me?

Currently with Templater I simply created a .md file with the code inside in the respective templates folder and I recall it where needed by simply inserting the model.

After a bit of testing I abandoned CustomJS also because I read that it can create conflicts with other plugins such as Templater.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.