Clutter free edit mode

That would be pretty awesome!

@OliverM: here you go

Theme-Klaas-Vaak.css (37.3 KB)

3 Likes

Maybe you are looking for this plugin:

@OliverM: real WYSIWYG will be incorporated in Obsidian - see Licat’s comment.

Instead of hiding all markdown clutter and then make exceptions, I tried to specify the elements to be hidden. Here are the codes for hiding Hide Bold, Italic, Strikethrough syntax

/* Hide Bold, Italic, Strikethrough Syntax */    
div:not(.CodeMirror-activeline)>.CodeMirror-line span.cm-formatting-strong,
div:not(.CodeMirror-activeline)>.CodeMirror-line span.cm-formatting-em,
div:not(.CodeMirror-activeline)>.CodeMirror-line span.cm-formatting-strikethrough,
{ display: none; }

Not sure why any of these are not working for me. Pasted that last one to the bottom of the obsidian.css file.

Maybe try adding ‘!important’ for each line?

1 Like

Maybe try adding ‘!important’ for each item?

1 Like

Like so?

I think you’re editing the obsidian.css.md file, because Obsidian doesn’t let you open CSS files directly.

Try finding this file in your file explorer, and renaming it to obsidian.css without the trailing .md.

1 Like

So this is embarrassing…like you said, I was editing an obsidian.css.md file that was in one of the template workflow folders I’d gotten from the forum some months back.

I did try to do it in the css file itself, but I failed. I’ll try again and worst case I’ll wait for someone to work it into their plug-in. Thanks everyone.

Please make sure it’s in the vault root, turn on the Apply obsidian.css option, and remove the .md extension. That should be all that’s needed to make it work.

I hope that helps!

1 Like

Thank you! I’ve removed the .md extension and placed it in this folder.

Screen Shot 2020-12-23 at 7.23.19 AM

The vault root is one level above, in the same level as .obsidian, not in it.

1 Like

Thank you for being patient. I searched my drive and it seems I had 3 different Obsidian.css files that came along with the workflow templates from way back. I deleted everything and retained one copy.

That did it =)

Hiding html tags

I have been experimenting with highlighting text with different colors, using <span> html tags.
For example: <span style='background-color:Pink;color:black'>text here</span>

When using the following the following css to hide the html tags in editor however, the css snipet only hides <span> and </span> but does not hide the style='background-color:Pink;color:black' portion.

Is there a workaround for this?

Thanks!

Additional Info

See Gif

hideHtmlTags.css /* hide all html tags */ div:not(.CodeMirror-activeline)>.CodeMirror-line span.cm-tag { display: none !important; }
1 Like

I’ve been wondering about how to remove the rest of the text within HTML tags as well. Closest I can come up with is:

div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-attribute{ display: none; }
div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-string{ display: none; }

This still leaves the equals sign visible (the one after the "style" attribute). I'm trying to tell myself that this is be a good thing, as it shows that something is there.
2 Likes

This! This is a game-changer, thank you! Obsidian looks so clean, now.

I wanted to keep hashtag symbols, because my hashtags look like pills and it gets all cut off without the hash symbol. If anyone else wants this, just change this:

/* except list markers */ span.cm-formatting-list,

To this:

/* except list markers */ span.cm-formatting-list,
/* and hashtags */ span.cm-hashtag

:+1:t3:

@terheyden: there is a way to hide the # character in Preview.

1 Like

Any way to make checkboxes still work when the tab indent is increased in Appearance settings? When I move the slider up, suddenly markdown checkboxes disappear.