Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Append template (possibly) conflicts with core Templates plugin #219

Open
AlbinaMuzafarova opened this issue Apr 23, 2024 · 0 comments
Open

Comments

@AlbinaMuzafarova
Copy link

Hi,

I tried to use the following button:

name update
type append template
action Action - scan 

^button-update

and there was no action upon clicking it until I've disabled the Templates core plugin. I am new to Obsidian and was under impression that buttons could be used with that core plugin on. The template itself (Action - scan) seems to be fine as it executes without errors when creating notes with the Templater community plugin (or with that button when Templates deactivated).

Not sure if it's related or helpful, but I also keep running into issue with append command buttons, e.g.:

name update3
type append command
action Templates: Insert template

^button-update3

In the console, it shows VM199 plugin:buttons:1432 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'lineEnd'). When clicking on the link in the error, it goes to the following if-statement, underlining the buttonStart.lineEnd + 2,0); part:

    if (args.type.includes("append")) {
        app.workspace.getActiveViewOfType(obsidian.MarkdownView).editor.setCursor(buttonStart.lineEnd + 2, 0);
        app.commands.executeCommandById(command.id);
    }

I wasn't able to make it work so far despite the error message.

Buttons version: 0.5.1
Obsidian version: 1.5.12
Templater version: 2.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant