Hide or Truncate URLs in Editor using CSS?

Might you have anymore wisdom to share? How do I hide the brackets / parenthesis [ ] ( ) that wrap each link?

Maybe I’m missing something and there is already a way to do this with a community plugin? I checked out Advanced Obsidian URL and Advanced Appearance but those don’t seem to do what I desire…

Thanks for this tweak! Beautiful.

Is there a way to do the same for nested tags that are long and for attachments like PDF?

Hide the Title of the note from a heading link @moderators

Currently

  • [[Note1#Heading 1]] is being displayed as Note1>Heading 1

What i want

  • [[Note1#Heading 1]] as Heading1

Current work around

  • [[Note1#Heading1|Heading1]] is being displayed as Heading 1
  • Using regex expression in Notepad++ or using Sed commands in linux
    • Notepad++
      • Find: (#)(.+)(]])
      • Replace: \1\2|\2\3

Problem with current solution

  • but the above soulution need us to use “| parameter” syntax which is sometimes cumbersome to use and track
  • In editor mode, link becomes too long and takes too much space on screen

A CSS based solution

  • Kindly replay whether there a solution using CSS
  • Hide or Truncate - Internal Heading Url - Similar to this CSS hack

Works so well, and so simple to setup even for a css noob like myself. (just create a text file with .css extension in the snippet directory)

Thank you!

Really useful code thank you. Any idea how to implement strikethrough formatting on checklists in editor mode? (Like they function in preview)

Hi! Tell me how to make links containing the Cyrillic alphabet work?
2021-09-28_124921

@Antinik62 Apparently, the problem here is not the Cyrillic letters, but the closing parenthesis ) as part of the URL. In this case you should enclose the entire URL in angle brackets <...> like this:

[Description](<URL>)

Is there a way to make this work with wikipedia.org to show just (🔗)?

The CodeMirror Options plugin works really well for this.

2 Likes

Thanks, it works perfectly

1 Like