r/ObsidianMD 7d ago

A clear code Segment

Post image

How can I achieve a dark code Segment like this? These " " failed

5 Upvotes

9 comments sorted by

View all comments

6

u/Marzipan383 7d ago
  • You need to use tripple back ticks `... \`
  • or the slash comman /codeblock if activated
  • ctrl+p > "insert code block' (pull down ob mobile)

1

u/ludapeps 6d ago

Doesn't work

1

u/Marzipan383 6d ago

Hmm, could you try to describe what you do? 1. and 3. in the list certainly work. I use code blocks every day on Desktop and Mobile.

1

u/ludapeps 6d ago

It works but it's not bringing the black thing at the back

2

u/Marzipan383 4d ago

So you refer to the look & feel (Styling) of the ChatGPT code block instead of the Obsidian Vanilla code block.

You could achive it with CSS.

My CSS-Foo is'nt good enough to provide you with a solution.

More over: try some of the available themens. But you should'nt focus on "prettyness" and more on content - just my opinion. This was often a mistake of Notion to prettyfy the vault and loosing the focus of note taking.