Marking multiple blocks

Things I have tried

What I’m trying to do

I am trying to mark the text in my notes, i want to basically tag single or tag multiple blocks. it is not useful to highlight a major part of text if all of it important. i want to show all of it is important. i also like to separate a part of text and tag it. it is a bit different than headings, i use headings too and i dont want to use that marker to this end. Is there a way to do that? i have noticed that html tags usually don’t show up in preview mode after rendering. is there a way to use them to make a visual mark in part of notes? is there an other way?

Would the admonitions plugin be able to do what you want?

Similar to quotes, it will separate text and tag it.

2 Likes

thanks,

that is a possible option, i totally forgot about that. but it uses the block codes which makes it weird in edit mode when i first read and highlight articles and books. more importantly i want to block reference to those blocks, i am not sure how it is going to work when the original block be in a code block. i usually use admonition to put a block reference embedded in the text. so i must test it

p.s. it works great to my surprise, even tho the block reference identification number is not part of the part obsidian recognize it. very helpful

Do you mean something like this?

1 Like

yes, exactly. that looks perfect. where i can learn everything about this class html tag?

I use the html tag <mark> and define the css attributes via css snippets.

The basic information comes from here (once again, by @Moonbase59 :slight_smile: )

Then I added some extras. For example, for the two “boxes” I added this:

:root
{
  --note-blue-l: rgba(80,180,210,0.1);
  --note-blue-d: rgba(202,240,255,0.08);
}

.theme-light {
  --note-blue-highlight-bg: var(--note-blue-l);
}
.theme-dark {
  --note-blue-highlight-bg: var(--note-blue-d);
}

/* MY NOTES */

mark.note-blue {
  display: block;
  background-color: var(--note-blue-highlight-bg) !important;
  font-size: 12px;
  border-radius: 8px;
  padding: 10px;
  margin-left: 30%;
  opacity: 80%;
}


mark.margin-note {
  display: block;
  background-color: transparent !important;
  border: 1px solid;
  border-color: var(--text-faint);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  padding: 10px;
  margin-left: 30%;
  margin-top: 8px;
  margin-bottom: 8px;
}

2 Likes

when i activate that snippet all the highlights stop showing, any idea why that is happening? maybe it is old or modified. can you please share the final snippet with all the corrections with me. that is weird since it is such a simple and short code.

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