Skip to content

Example for js script execution seems to be wrong. #644

@sdelmas

Description

@sdelmas

Please fill out these Check-boxes

  • I checked for existing similar issues
  • I checked that the plugin is up to date
  • The issue persists with all other plugins and themes disabled

Plugin Version

1.4.6

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Debug Info

Console output when running the example:

Hello ${context.args.greeting}!

Describe the Issue

Using the example at https://www.moritzjung.dev/obsidian-meta-bind-plugin-docs/reference/buttonactions/runjavascript/ I would suggest that using the context variable is presented wrong. Instead of:

console.log('Hello ${context.args.greeting}!');

it should be:

console.log('Hello ' + context.args.greetings + '!');

as this is not any templating code or such, but JavaScript. The example as it is just prints the original string "Hello ${context.args.greeting}!" without any variable expansion.

Great plugin btw... thank you for all the hard work :-).

Steps to Reproduce

Just set up the example and run it.

Expected Behavior

The variable should be expanded and the actual value should be printed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behavior caused by this plugin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions