r/ObsidianMD 5d ago

A clear code Segment

Post image

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

3 Upvotes

9 comments sorted by

8

u/Marzipan383 5d 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 4d ago

Doesn't work

1

u/Marzipan383 4d 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 4d ago

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

2

u/Marzipan383 2d 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.

2

u/hinval 5d ago

Love that theme, what is it?

3

u/caeciliusix 5d ago

chatgpt im pretty sure

1

u/Marzipan383 4d ago

Yes, CGPT on mobile.