obsidian-execute-code icon indicating copy to clipboard operation
obsidian-execute-code copied to clipboard

[FEATURE] Optionally disable execution

Open MathiasSven opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. I have accumulated multiple code blocks in my notes, but some code blocks are not meant to be run, just viewed. Running them might simply just produce an error, or might end up creating needless files, change user configurations, and alter state I didn't mean to. Usually for me, it is obvious which code blocks are meant to be run because I tend to add a bunch of echo's or logging facilities, but it would be nice if this guesswork wasn't there.

Describe the solution you'd like Add a way to disable the rendering of the Run button based on something like this:

```norun-python

or

```python {active=false}

where {active=true} by default

Describe alternatives you've considered Removing the language next to backticks, but that removes syntax highlighting.

MathiasSven avatar Oct 09 '24 13:10 MathiasSven

An alternative could be live preview mode which doesn't show Run button with language next to backticks.

sbhal avatar Nov 19 '24 21:11 sbhal