Advertisement
Guest User

Obsidian snippets

a guest
Apr 7th, 2024
1,072
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. Snippet #1: this snippet allows lets you turn a piece of text into a tooltip so that when you hover over it, additional information is revealed.
  2.  
  3. Paste this into your note:
  4.  
  5. <abbr data-title="Tooltip content">Tooltip display</abbr>
  6.  
  7. Or if you have the templater plugin you can select the text you want to turn into a tooltip and run the following templater command:
  8. <%* tR = `<abbr data-title="content">${tp.file.selection()}</abbr>`; -%>
  9.  
  10.  
  11. CSS:
  12.  
  13. abbr{
  14.  
  15. text-decoration: overline;
  16.  
  17. font-weight: 700;
  18.  
  19. font-size: large;
  20.  
  21. color: #9E7EFF;
  22.  
  23. }
  24.  
  25.  
  26.  
  27. abbr:hover::after {
  28.  
  29. bottom: 100%;
  30.  
  31. left: 100%;
  32.  
  33. display: block;
  34.  
  35. padding: 1em;
  36.  
  37. max-width: fit-content;
  38.  
  39. background: #7c49f4;
  40.  
  41. border: 1px solid var(--tooltip-edge-colour);
  42.  
  43. background-color: var(--background-primary);
  44.  
  45. border-radius: 8px;
  46.  
  47. border: 1px solid #7c49f4;
  48.  
  49. content: attr(data-title);
  50.  
  51. }
  52.  
  53. Snippet #2: Allows you to obfuscate text inline. To reveal the text, click on the area in live preview mode. The text will be visible in source mode.
  54.  
  55. Paste the following into your note:
  56. <span style="font-family:'Flow Circular', sans-serif !important">Spoilered content</span>
  57.  
  58. Or select text and then run the following templater command:
  59. <%* tR = `<span style="font-family:'Flow Circular', sans-serif !important">${tp.file.selection()}</span>`; -%>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement