How to hide ID-Numbers like "^239403294" in preview-mode

I’m using Obsidian for studying, and I also use the “Flashcard”-Plugin for producing Anki-cards.
This plugin writes an ID after each line, that should be a card.
In editor-mode this ID is smaller than the text and ok., but in preview-mode it is as big as written text. This is annoying when studying.
You always need energy to ignore it.

Is there a way to get rid off these (^3298432) numbers in a text in general in preview-mode?
A snippet or something like that?

You need to know the name of the element that is the id number.

Open your anki note in Obsidian, Hit CTRL/CMD+SHIFT+i to open the cosole, click the Element tab. Roll up and down over the code in the console and look at the highlighting on the anki note to see if you can identify the id number code. Its probably called something like ID Number.

Once you know that, you can try adding a CSS snippet that changes the size and color of the text in the preview mode.

It will be something like:

.markdown-preview-view [element name] {
size: 5px;
color: gray;

You’re going to have to do some work to figure out the details and then post back here to get some specific help.

Thank you for your fast reply and for the suggestion for a possible snippet.
I am no computer-programmer, but I will try to find the name of this ID, somehow.
Doesn’t seem to be an easy thing…

@Superfeuchter Actually, block IDs should not be visible in preview. Could you give us an example?

Well, now I tried to find examples, and I found out, that the block IDs don’t appear everywhere. In some lines they appear, in some not.

Here is an example of editor-mode:


and the same in preview-mode:


@Superfeuchter Well, I would suggest first to check if your block IDs are preceeded with spaces (no tabs, no no-break spaces, etc) and placed at the very end of the line (no trailing spaces, etc.). Then I would switch to default CSS theme and see, if the issue still persists.


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