obsidian-css-editor icon indicating copy to clipboard operation
obsidian-css-editor copied to clipboard

Add support for javascript (and python?)

Open holroy opened this issue 1 year ago • 2 comments

I know this plugin is called css-editor and that for a reason, but I would love if this plugin had the option to also edit javascript files. So do you know if that is at all possible, and what kind of changes would be needed to get it up and running as a javascript editor also?

holroy avatar Apr 09 '24 19:04 holroy

I have no plans to support other languages with this plugin, you are free to create a separate plugin for that use case. I want to keep the scope of this plugin as small as possible, just editing CSS files.

It is possible to add other language support. I added CSS support using the @codemirror/lang-css package. I'm sure there is similar language support provided by the CodeMirror team for other common languages.

Zachatoo avatar Apr 10 '24 03:04 Zachatoo

I see your reasoning, and I don't oppose them. But if you had some pointers as to how I would proceed in making a new "obsidian-js-editor" using the same logic as you've used, it would be appreciated.

holroy avatar Apr 11 '24 18:04 holroy