Skip to content

Usage

Start by creating a code block with js-engine as the code block language. Inside the code block you can write what ever JavaScript code that you want. The plugin will run the JavaScript and render the returned value in place of the code block.

## This is a Note in Obsidian
```js-engine
return engine.markdown.create('*test*');
```

The following example will render a simple plain text string.

let str = '*test*';
return str;

*test*

We can use the engine.markdown.create function to render the string as markdown.

let str = '*test*';
return engine.markdown.create(str);

test

When you return nothing or undefined, the plugin will not render anything and the code block will be invisible.