mdelobelle / obsidian_supercharged_links

obsidian plugin to add attributes and context menu options to internal links

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Add content before link" does not work

merlinuwe opened this issue · comments

Thanks for your interesting plugin.

Prepend text does not work in Obsidians file explorer (and in make.md file explorer, too).

Inside of a note there is no problem.

The settings:

image

Here you see how it looks in the file explorer:

image

What can I do to get it run?

SYSTEM INFO:
Obsidian version: v1.1.9
Installer version: v1.1.9
Operating system: Windows 10 Home 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: off
Legacy editor: off
Base theme: dark
Community theme: Minimal v6.1.17
Snippets enabled: 23
Restricted mode: off
Plugins installed: 63
Plugins enabled: 50
1: Vault Statistics v0.1.3
2: Templater v1.16.0
3: Tag Wrangler v0.5.5
4: Tasks v1.20.0
5: Symbols Prettifier v1.1.1
6: Style Settings v0.4.12
7: Sortable v0.2.6
8: Scroll to Top Plugin v1.5.0
9: Recent Files v1.3.5
10: Paste image rename v1.5.0
11: Pandoc Plugin v0.4.1
12: Obsidian Enhancing Export v1.1.7
13: Obsidian Camera v1.5.0
14: Number Headings v1.10.0
15: Minimal Theme Settings v6.1.1
16: Buttons v0.4.19
17: Auto Class v2.2.0
18: Advanced URI v1.31.2
19: Bulk Rename v0.4.4
20: Waypoint v1.4.0
21: Show Current File Path v0.5.2
22: Reminder v1.1.15
23: Text expand v0.11.2
24: Calendar v1.5.10
25: Commander v0.4.9
26: Completr v3.1.0
27: Contextual Typography v2.2.4
28: Copy document as HTML v0.3.3
29: Core Search Assistant v0.9.1
30: DB Folder v3.1.2
31: Dataview v0.5.47
32: Custom File Explorer sorting v1.4.0
33: Editing Toolbar v2.2.3
34: Editor Syntax Highlight v0.1.3
35: Excalidraw v1.8.7
36: Excel to Markdown Table v0.4.0
37: Execute Code v1.6.0
38: File Explorer Note Count v1.2.0
39: File Tree Alternative Plugin v2.2.7
40: Find orphaned files and broken links v1.8.0
41: Folder Note v0.7.3
42: Homepage v2.6
43: Hover Editor v0.11.8
44: Icon Folder v1.5.1
45: Image Layouts v0.10.0
46: Janitor v1.0.7
47: MAKE.md v0.5.6
48: Linter v1.10.1
49: Meld Encrypt v2.0.4
50: Supercharged Links v0.9.3

Is that screenshot from the FileTree Alternative Plugin?
PrePend Text doesn't work there, and neither coloring
Coloring works in the normal Obsidian File view and Prepend should too
In the note prepend works, Link Color too, but I can't see Font Weight lighter or Font decoration line-through being used.
But for whatever reason prepend stopped working for me too in the original file view.
Any idea on how to troubleshoot?

No, it is the file explorer:

image

But I also have file tree alternative plugin installed.

image

oh well.. there is something weird going on.. no stuff which did work doesn't work anymore and vice versa on my side.

Have you tried with the default theme/no other CSS snippets? Looks like a CSS conflict with your theme, I don't have this issue.
I've also created #165 for compatibility with make.md.

Thanks for your reply and you're right. This piece of CSS caused the problem, so I commented it out.

/*
.nav-folder-children .nav-file-title-content:first-child::before {
  color: #d8ff00;
  content: "🗋 ";
}
*/

Do you see a way to keep the file icon 🗋 as first?

You can add it to the prepend text setting in supercharged, but then it's everywhere. Only option is to manually add a CSS rule in supercharged for this...

Thank you very much, I found a solution by using your plugin:

IMG_20230108_234325

This still appears to be a problem, at least for me, and I've noticed something strange. Whilst changing to the default theme fixes the issue, when I switch to the ITS theme the styling rule that should be setting :before's content to a css variable is still applied, but the css variable is an empty string.

With the ITS theme:
image

With the default theme:
image

These are random IDs that are internal to the generated CSS from this plugin only, right? The selector setting the variables is different in the two cases, why would that be?

Well this doesn't look right
image

Looks like it was my bad font settings causing this, PEBKAC. I guess let this be a warning to anyone in the future, style settings doesn't inject the styles one by one with validation so one typo and you can explode the whole thing.