Markdown card code editor

I use markdown cards a lot (they are the primary card on my HAAG (Home At A Glance) dashboard.

Many of my markdown cards have hundreds of lines of code. Unfortunately, it seems that every time I edit a card and then save it, all my CR/LF’s are removed and the editor inserts its own. It does it in a way that doesn’t affect the functionality - but it means that every time I go and edit a card, I first spend a lot of time reformatting the code so I can read it. I’m wondering if there is something I am doing wrong that causes this behaviour - or is there a better way of editing the code that doesn’t cause this behaviour?

You can use the community add-on “Studio Code Server”

But yes if you edit in UI-code mode direct on the card, it removes commends also (or it used to, not sure if they if that is “fixed” )

There is also The community add-on " File-Editor ", it has "Marksdown"as a language “Option” haven’t tried there, so i don’'t know if it does remove CR/LF’s , but it does not remove commends, not sure about CR/LF

I use mostly Notepad++ … when i know what to do :slight_smile: , and most larger cards/views i always save a copy in Windows

Thanks! I believe I am missing one important piece of knowledge :-).

I do have both of these editors installed - but while I do edit yaml code in them - I wasn’t aware I could read a markdown card in them. Is it just a matter of me knowing where they are stored? Where would that be?


in File-Editor , cock-wheel in top-right ,choose “editor settings” / “mode” -scroll up to “markdown”
PS: I never tried markdown in it, only using it for yaml

I SCS you can install/import an extension, there are several !

But to be honest, im still struggling with SCS, for just the basic stuff

The only Markdown card i’ve ever "made (for HA), was a “copy/paste” into notepad++, and edited to my liking