How to hide block id in reading mode using custom CSS?

What I’m trying to do

I’m trying to hide block id in reading view.
But there is no class/id for block id in reading view. How to hide it with custom CSS?
image

If it doesn’t have any html tag, you can’t use pure css to hide it. It needs to have something for the css to target.

Your next option would then be to use javascript to assign some tag to it, so it can be hidden using css.

I’m confused. Reading view/mode doesn’t show the block ID in the editor.

However, you can hide it in Source and Live Preview modes.

Maybe you formatted your block id wrong? It should not be visible. On your screenshot there is a space befor the “^”, maybe try to remove it?

1 Like

I figured it out. When there is a empty line after block id, it’s not visible in reading mode. But my text is something like this(I’m using this anki plugin Home · reuseman/flashcards-obsidian Wiki · GitHub):

question 1::answer 1
^12334
question 2::answer 2
^12335

The second is invisible in reading mode, but the first one is visible.
I think it’s kinda weird. Both are under .cm-blockid in editing mode, but act differently in reading mode.

Interesting. Yeah, they (the first question/block id and the second question/block id) seem to need a blank line between them to separate them as blocks.

Don’t know if either of these will work with your Anki workflow, but both seem alright:

question 1::answer 1 ^12334

question 2::answer 2 ^12335

---

question 1::answer 1
^12334

question 2::answer 2
^12335
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.