How to execute JavaScript in vault without plugin like CSS Snippet?

Hi there :slight_smile: :raised_hand_with_fingers_splayed: ,

Does obsidian take restricted JS in vaults without a plugin? If it does where can it be stored?

I would like to write some executable code with JS or TS in my vault to style MD notes which css is not able to style but I can’t find any suitable way to do so.

There is a way with Dataview, unfortunately it is a Community Plugin not a Core Plugin as far as I know.

What I’m trying to do

I will start Obsidian Doc stortly but I fear that does not fix my problem.

Things I have tried

I checked out the Obsidian Help and searched google and forums and topics hear to find a way to fix my problem.
At least I was able to implement CSS Snippets to style a part of MD.

I hope that anyone can help me with my problem

Best regards,
MB

To my knowledge there isn’t any nice interface to run javascript (nor typescript) from the native Obsidian app with just the core plugins.

Theoretically you could extend some of the original files, if you’re really determined not to use community plugins. But personally I would then rather develop my own plugin, or use one of the community plugins before hacking the original files.

2 Likes

thank you for your help @holroy!

I feared that.

I never hack any original files either, if it is not really needed.

I find a way. If nothing helbst, I need to develop a plugin to solve this problem.

I also would like develop a plugin for…

  • Link Plugin for the Frontmatter
  • Link with different colors (but I guess I found a way to do that in CSS)

But I have to learn Obsidian APIs. I’m still new.

Anyway much thanks for help :).

Best regards,
MB

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.