Spoiler tag to hide text by default

I’m using Logseq extensively at work and as a manager, there are some things I’d like to hide by default so I don’t accidentally show them when sharing my screen (notes sharing).

A “spoiler tag” would be sufficient to hide these: the text foreground color would be set the same as the background color and then either with a button or on mouseover, the color would be reverted to the original theme color.
In this way, the text is practically invisible by default.

This approach is commonly used in forums when talking about TV shows and similar things, hence the “spoiler tag”

I think that could be done w/ CSS styles. Not the most versed on that topic, I use two other alternatives:

  1. Use a link:
[spoiler tag](whatever it is that you want to hide)
  • Shows the text when you click on the block AND when you click on the link. The latter takes you to a page titled “whatever it is that you want to hide”
  • Caveat: the hidden text in these “links” shows in the search feature, so you do not want to be searching while sharing your screen.
  1. Use HTML comment flag:
#Spoiler <?/* whatever it is that you want to hide */?> 
  • Shows the text ONLY when you click on the block
  • Text does not show in the search feature, unless you make it a page

Not perfect, BUT works for me

1 Like

@francescob, what if Logseq had a global filter to filter (out) blocks on pages? Here’s a feature request for that:

OH That’s brilliant. Thank you, I can totally use those work arounds for the time being!

I didn’t even consider this, but sounds amazing. There would need to be a “fast button” to disable the filtering though, or it would be too annoying to edit the settings file every time

1 Like

I noticed one limitation is that this doesn’t work with multi-line, so a feature is still desirable, especially when having nested blocks and multiple lines

Yes, there is that. You could, if you wanted, go to the page created by the hidden link and write stuff in there…

Again not perfect, but a workaround.