Home / GitHub Page

Add toolbar icon for <mark>

Please add Markdown highlight support. Thanks

3 Likes

It is available on desktop, but not on mobile - yet.

1 Like

Is it possible to add a dedicated icon on the toolbar on desktop app?

dedicated icon for what?

I mean: add an icon in the toolbar a
to highlight text, jut like B to bold text.

last I checked Markdown doesnt support a highlight function but rather uses HTML5’s <mark> feature.

I might have misunderstood. @desk7 did you mean syntax highlighting or the <mark> html code?

Simply the <mark> html code

Ok, <mark> is supported to be rendered in Joplin, but it is used internally to highlight search results.
Thus using <mark> could lead to confusion.

Anyhow, I was originally talking about syntax highlighting, which is currently supported by the desktop versions, but not the mobile versions.

1 Like

Even if it’s an html bit of code, I’d love a highlight icon that when clicked creates the code for me or wraps selected text. That’s the one final thing that is stopping me from migrating from OneNote. I know it seems silly to let that stop me, but I read and highlight web clipped articles all the time and not being able to do that with a click or two is a big enough deal for me to keep finding myself making my new notes in OneNote instead of Joplin.

Pretty please? :smiley:

Technically it’s not a problem to create such a button, but as I mentioned before <mark> is used by search to highlight results.

So how do you want to solve this?

I am not technical when it comes to software. I’d just be happy with <span style="background-color: yellow"></span> around my selected text or, if no text is selected, added to the note at the cursor position so I can type text inside it. Anything beyond that is probably beyond my experience with what you’re asking.

I currently have the following in my userstyle.css file (in the joplin-desktop directory):

.highlight { background-color: yellow; }

It works in Joplin to turn any spans I create manually into highlighted text. But an icon that does this quickly would take this to the next level for me. This was just to try to make things quicker and was my own effort to get highlighting of text (in the traditional sense) to work. But truly, the first option above is best, because then I could change the color of the highlight at any point for different text. :slight_smile:

I think we have to wait for @laurent’s input. Highlighting is certainly an important feature. We just have to figure out how to make it happen.

@lynn in the latest version 1.0.142 you can activate the mark plugin and then use the following:

==marked text==

2 Likes

Awesome, works like a charm.

For anyone reading this that doesn’t know, the plugin is listed under options. It was already checked for me in the updated version.

I did update my userstyle.css so that all highlights would be yellow. :slight_smile:

mark { background-color: yellow; }

Much easier for me to read.

Really happy about this addition. Thanks so much!

It would be super helpful to have a toolbar button (and keyboard shortcut) for mark plugin. The usage would be exactly the same as, say, the bold button:

  1. If text is already highlighted, then add == to the beginning and end of the selection
  2. If text is not highlighted, then add ==marked text==

A keyboard shortcut would be great, too.

3 Likes

The shortcut might be coming with the new shortcut editor. But no promises yet.
It is a plugin after all. It’s something I wanted to talk to Anjula about anyway.

1 Like

I love the new shortcut editor to customize my keyboard shortcuts. Just missing an option for the marked-plugin. Any news on this?

I'll point out this will not be sufficient; if your selection contains line breaks, the highlight won't work. You'd need to add them to beginnings and ends of every paragraph.

Incidentally, the other commands already present have some related issues.
On one hand, it behaves just as Mark would - it adds asterisks on beginning/end of the selection. However, the left pane renders it differently from the right one. (First line shows up bold.)

I've added one already. But it's not in a PR yet. I'm collecting a few more and then add them all at once.

2 Likes