FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » Markdown files formatted view with selectable and highlighted text
Markdown files formatted view with selectable and highlighted text [message #1478] Wed, 22 June 2022 21:03 Go to next message
Mustafa_iEEE
Messages: 7
Registered: June 2022
Junior Member
I depend heavily on Obsidian for my university self-notes, and all those are just Markdown text files with '.md' file extension.

At the moment when searching and viewing any markdown files I have 2 options;

- Either 'Quick Look Preview' which shows a formatted version but no highlights and can't even select any of the text (almost like an image).
- Or the 'Plain Text' version which, as the name suggest, just a plain text with highlighted search keywords.

Is there a way to have both?

It's much easier to eyescan a formatted text.


Re: Markdown files formatted view with selectable and highlighted text [message #1480 is a reply to message #1478] Fri, 24 June 2022 17:47 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 406
Registered: April 2020
Senior Member
Markdown files require a Quick Look plugin in order to be displayed formatted.

Quick Look plugins that use the modern API can't be used in FoxTrot (or with no highlighting).

Those using the legacy API can normally be used, by internally using the qlmanage command line. However, for some file types, qlmanage crashes on macOS 12. When this happens, in the toolbar you can toggle the display type to plain text (this will apply to all files with the same filename extension).

There is a different issue with some other file types, where qlmanage returns nothing, without crashing (the files are then displayed in plain text). Version 7.5.2 will change how qlmanage is called, and this should fix this issue.

We have found two different Quick Look plugins for markdown files, which may give different results. They are listed in our FAQ


Jérôme - FoxTrot Engineering
Re: Markdown files formatted view with selectable and highlighted text [message #1481 is a reply to message #1480] Fri, 24 June 2022 21:13 Go to previous messageGo to next message
Mustafa_iEEE
Messages: 7
Registered: June 2022
Junior Member
Yes, I noticed none of the markdown apps I have installed (Obsidian, Typora & iA Writer) offers a Quick Look plugin.

So did install Toland's QLMarkdown, which allowed me to view them formatted in FT. However, as you said it doesn't support searching keywords highlighting nor allowing text selection.

On the readme section Toland also mentioned the same issue.

Quote:
This command is only valid on OS X 10.10 and below as Apple has since removed the ability to select text in QuickLook.

Currently running MacOS 12.4 M1 Pro, with FT Pro 7.5.1.
Re: Markdown files formatted view with selectable and highlighted text [message #1482 is a reply to message #1480] Fri, 24 June 2022 21:15 Go to previous messageGo to next message
Atlas
Messages: 140
Registered: August 2009
Senior Member
I recommend this markdown quicklook plugin: https://github.com/sbarex/QLMarkdown. It's getting frequent update (which is a lot more important than you might expect), and allows you to select your markdown text while in quicklook. Sometimes it's buggy and you're not able to select text, but this is rare and can be resolved by just restarting the quicklook plugin. The developer is also pretty responsive to suggestions. For example, you can set up a default window size for your markdown quicklook, which is incredibly useful because the window size is predicable and doesn't change from one document to another. It supports syntax highlighting but not text highlighting (I don't think any quicklook does that right now); l but you might be able to request that by submitting request on Github project.
Re: Markdown files formatted view with selectable and highlighted text [message #1483 is a reply to message #1482] Fri, 24 June 2022 23:15 Go to previous messageGo to next message
Mustafa_iEEE
Messages: 7
Registered: June 2022
Junior Member
@Atlas

I actually found that the one is working for me is the Sbarex QLMarkdown and not the Toland's ... I installed a few of the MD QL plugins to try and things got mixed up!

So, in fact, the Toland's is not working and doesn't even show-up in the System Preference > Extensions > Quick Look menu.

Sbarex/QLMarkdown does show the text formatted in Foxtrot but doesn't allow selecting text or highlighting search query.

But if I control+click a markdown file outside Foxtrot and click on Quick Look the text view is formatted and selectable.
Re: Markdown files formatted view with selectable and highlighted text [message #1484 is a reply to message #1483] Sat, 25 June 2022 02:58 Go to previous messageGo to next message
Atlas
Messages: 140
Registered: August 2009
Senior Member
(1) You are correct that when I choose to Quick Look within Foxtrot, the text is not selectable, but if I open the markdown file in Finder then I can.

(2) Text doesn't highlight with Sbarex sometimes. Go to Sys Preferences > Extensions > Quick Look. Uncheck other quick look plugins that might overlap with QLMarkdown. For example, I have iPreview and sometimes unchecking it will let me highlight text in QLMarkdown again. It shouldn't be that way, because I place QLMarkdown above iPreview, but that's what I'm seeing on my end. Otherwise, you can try downloading QLMarkdown from github again, drop it into Applications to replace the current version, then open QLMarkdown app to activate it. You have to open the QLMarkdown app say that that app is safe to use, otherwise MacOS will continue to sandbox it. To be honest, I have no idea what's causing the problem. Hope that helps.

[Updated on: Sat, 25 June 2022 03:32]

Report message to a moderator

Re: Markdown files formatted view with selectable and highlighted text [message #1485 is a reply to message #1484] Sat, 25 June 2022 03:52 Go to previous messageGo to next message
Mustafa_iEEE
Messages: 7
Registered: June 2022
Junior Member
I tried every settings option possible and no hope!

But noticed the following:

- If you select a Markdown file in the search result and press 'spacebar', that will open system's (Sbarex's) Quick Look and in this case the text is formatted and selectable but still no highlights.

- And if you use the double-finger click then that will open the FT Quick Look, text is formatted but not selectable nor highlighted.

maybe that's why you say texts sometimes selectable other times not?

[Updated on: Sat, 25 June 2022 03:53]

Report message to a moderator

Re: Markdown files formatted view with selectable and highlighted text [message #1486 is a reply to message #1485] Sat, 25 June 2022 04:04 Go to previous messageGo to next message
Atlas
Messages: 140
Registered: August 2009
Senior Member
1. No, I mean SBarex's quicklook sometimes fail to give selectable text even when in Finder. It's a bug that happens sometimes, and doesn't have anything to do with Foxtrot.

2. Yeah, I think using spacebar to invoke Finder's quicklook rather than using Foxtrot quicklook is your best bet.

3. I haven't seen any markdown quicklook plugin that's able to show highlights, so you might have to submit a feature request with SBarex. The project seems responsive to suggestions, so you might be in luck. Wait ... or do you mean show Foxtrot's search highlight? If that's the case ... you might have to wait a while, because I have a feeling that's a pretty big feature for Foxtrot to work on.

[Updated on: Sat, 25 June 2022 04:04]

Report message to a moderator

Re: Markdown files formatted view with selectable and highlighted text [message #1487 is a reply to message #1486] Sat, 25 June 2022 04:12 Go to previous message
Mustafa_iEEE
Messages: 7
Registered: June 2022
Junior Member
1. Oh got ya.

2. Yeah at least for now. Maybe Foxtrot's devs try to do their own MD QL, this format is getting highly popular recently. Specially for users hates the cloud services and prefer to have everything local and future-proof.

3. Will do. TBH it sounds like something wrong from FT rather then the MD QL, because it's working normally outside FT's window.
Previous Topic: REQUEST: Show folder in location tree, even when it contains only alias
Next Topic: Search history
Goto Forum:
  


Current Time: Thu Nov 28 05:39:02 GMT+1 2024