Squiggle

by Jesse Hoogland
5
4
3
2
1
Score: 52/100

Description

Category: Note Enhancements

The Squiggle plugin has arrived, revolutionizing the way you interact with code snippets in Obsidian! With Squiggle, you can now execute code blocks directly from your notes, without leaving the app. This plugin adds a "run" button to supported languages, allowing you to see the result of your code execution instantly. The plugin also includes syntax highlighting with Prism, making it easier to read and understand your code. What's more, Squiggle allows you to render code blocks in the preview mode by adding "run-" before the language name. This feature enables you to test your code snippets without leaving the preview window. With Squiggle, you can now take full control of your code execution experience in Obsidian!

Reviews

No reviews yet.

Stats

26
stars
3,653
downloads
0
forks
1,316
days
1,339
days
1,339
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

4 years ago

Changelog

Removed console.log & potentially unsafe innerHTML

README file from

Github

Obsidian Squiggle Plugin

Note: This was forked from the obsidian-execute-code plugin.

This plugin allows you to execute squiggle code snippets in code blocks in your notes. The plugin adds a 'run' button for code blocks in supported languages. Clicking them results in the code of the block being executed. After the execution the result of the execution is showed.

It also adds syntax highlighting with prism.

The result is shown only after the execution is finished. It is not possible to enter text on the command line into the executed programm now.

Demo

Running in Preview

Adding run- before the language name in the code blocks (as in the example below) renders the code block in the preview already. This allows you to execute the code in the preview.

Installation

In your vault go to Settings > Community plugins > Browse and search for "Squiggle". Select the plugin, install it and activate it.

or

Follow this link and click "Open in Obsidian".

Warning

Do not execute code from sources you don't know or code you don't understand. Executing code can cause irrepairable damage.

Known Problems

  • Missing when run button after switching the theme: Try to close and reopen your notes and wait for a few minutes. It seems like obsidian doesn't call the postprocessors after the theme switch.

Future Work

  • Merge back into the execute-code-plugin? This probably isn't worth it as Squiggle is run inside of JS & rendered with the help of React. This is very different to languages that actually run on your computer.

Contribution

All contributions are welcome. Just create a merge request or email me: jesse(at)jessehoogland.com