Highlightr-Plugin: Highlightr not working in +Obsidian v.15.8 (last update) + other issues
Hey Chetachi! Just leaving some issues on the plugins here, so you can take a look later, take your time to deal with your personal problems, no need to hurry! First of all, congrats on the obsidian plugins, very nice job you did, I can see that you putted much love and effort in every single one of them. Thank you a lot.
Alright, so now the issues:
- Highlightr stopped working in Obsidian v.15.6 (or superior), even the shortcuts.
- 7/22/22 - Updated Obsidian to v.15.8, when using the “Ctrl+P” shortcut it works, but the Highlightr pop up don’t.
- An old problem with Highlightr, that I believe you already know, is the space after the marked text. (#39)
- A small detail, that would be nice to analyze, is that cMenu is taking a lot to load.
- Snippets plugin didn’t stop, but is having some basic bugs in its structure (not making possible to create new CSS Snippets through the plugin and the “hovering” when using the mouse is also bugged).
As I said, take your time alright? That’s it, best of luck 🫂
For those having the same problem, in the coments there is a ton of really good solutions. I personally used (not so aesthetic, but is pretty useful) "Wrap with shortcuts plugin $^1$ ", you can configure hotkeys for each highlight color/font color. It won’t have rounded highlights, but it can be a good option until Highlightr plugin comes back.
- The code to highlight in obsidian is:
<font style="background-color:#FFBD59A6"> text here </font> - The code to make colorful text is:
<font style="color:#FFBD59"> text here </font> - The letters and numbers after the “#” are the HEX code that indicate a certain color, the “A6” indicate the transparency. You can find good pallete colors in: https://coolors.co/palettes
$^1$ copy and paste on browser: obsidian://show-plugin?id=obsidian-wrap-with-shortcuts
Peace ✌🏻
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 26
- Comments: 55 (1 by maintainers)
For a workaround for the broken context menu (for the Desktop app), go to your
.obsidian\pluginsfolder orSettings -> Community Plugins -> Installed Pluginsand click the folder icon:Go into the
highlightr-pluginfolder and openmain.js. Search formenu.showAtPositionand replace the following:with
Basically, the
menu.sortfunction relies on menu items which this plugin just ignores. So, when it hitsmenu.sort, the dropdown is rebuilt and the dom (which this plugin manipulates) is reset. This change just makes thesortfunction a no-op.Hello friend @gabrielcarus ! Thank you for your notes!
I just released an update for Highlightr that should be much more compatible with Obsidian API. Please let me know if there are any issues with it!
This should be fixed in the update, though I’m still working on a function that is more intelligent.
I’ll have to completely redo cMenu at this point. Hoping to get this done soon.
I’ve also released an update for MySnippets. You should be able to create new snippets now.
And thank you everyone for being so patient 🙏🏽!
To be clear:
(1) Select text (2) Right click (3) Choose “Highlight” (4) Nadda, nothing, zippo
Control P works fine.
According to this method of modification, it works for me, but it needs to be closed once and restart obsidian
Another workaround for those who don’t want to make new hotkeys:
Highlight the word, open command palette, “Highlightr” - pick a color.
This takes longer, but I have enough hotkeys as it is, so this works for me as a temporary solution.
I am so happy I found this post, I thought I was the only one with this issue.
commenting out _menu.SetUseNativeMenu(false); and restarting worked for me.
I found the “other plugins location” issue, put the patched ‘main.js’ there, and now highlighting works! The patched version of ‘highlightr/main.js’ works well for both the desktop app and the iOS app. BUT - if your vault is in iCloud - the patch needs to be made to two instances of the ‘main.js’ file - thanks to an iCloud-specific (compatibility?) issue, described below…
Issue: Obsidian and iCloud (where I have put my vault) seem to have disagreements over where things should go, so those things (highlightr code) went to both locations. This “disagreement” is consistent with what I found yesterday setting up the iOS app to use the same (iCloud-based) vault as the mac desktop. More detail below…
From the mac’s Finder: The location where if I change the files this has an effect (e.g. patch works): ~/Library/Mobile Documents/iCloud~md~obsidian/Documents/.obsidian/plugins/highlightr-plugin Presented by Finder as:
The location where (if I change the files) this has no effect: ~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Obsidian iCloud Vault 001/.obsidian/plugins/highlightr-plugin Presented by Finder as:
Incidentally, as I found when setting up a shared vault for desktop and iOS apps yesterday… Desktop recognises the first one as “root”. iOS app only recognises the second one.
I guess Obsidian have handled that (in their code) by ensuring plugin downloads get copied to both locations. In each app/device’s case, renaming (only) its particularly-located ‘.highlightr’ files causes it (only) to pop up a “failure to load” message. Pretty conclusive then.
I imagine the best fix would be for clear and separate concepts of “Obsidian Root in iCloud” and "Obsidian Vault " (within Obsidian Root). There could be more than one Obsidian Vault in iCloud. I’m guessing that there might be confusion somewhere(s) “under the hood” about these.
I’ve just installed it yesterday and was struggling for hours. wish I noticed that its no longer available much earlier
Bravo! It works! Thanks!
This worked for me! I installed right now the plugin.
@chetachiezikeuzor could we please get a fix? thanks
Its not working for me any more with obsidian 15.6
FYI, I found a partial work a round – by setting hotkeys for the various colors, I can now again add highlights. But setting a hot key to open the highlightr doesn’t work – it just doesn’t respond, and doesn’t display the choice of colors. Also, to unlighlight, right-clicking on the highlight doesn’t bring up the unhighlight menu, but raises a note that “focus must be in editor” (I’m using live preview). Clicking on the highlight puts it in edit mode, then right-clicking brings up unhighlight option, and clicking then unhighlights. Hope this may help in troubleshooting. Really like this plugin when it was working normally.
See my post #41