Create STRIKETHROUGH button in format toolbar

I use the strikethrough formatting option extensively. As it is supported by both Markdown and HTML, could a button be implemented besides italic and bold?
And, since we are talking about this... why is there not a underline button?
These two implementations could ad greatly to the functionality with little effort (i guess).

4 Likes

Please update your Joplin app to 1.8.1, this is gonna give you strikies and underline in the WYSIWYG editor (through tool bar buttons). In the markdown editor, striky is invoked with ~~ your text here~~ (paired !), and underline can be invoked too. Just switch forth and back between the two editors, and you will see it.

3 Likes

Thanks for the reminder about the strikethrough button in WYSIWYG editor.

But it'd be nice to have the button also in markdown editor. I don't find invoking strikethrough with ~~ useful because I never write text with strikethrough to start. It's only later--e.g. when I've completed the task or something like that--that I want to go back and mark it as done/ignorable.

1 Like

if you make these as check boxes, then it is possible with the Plugin: Rich Markdown to make them striked after checking even in the text editor view. Don't know if that would help you.

image

Thanks. It could help in certain cases, but not all since I also use strikethroughs to mark regular text that might no longer apply but which I don't want to delete. Also, strikethrough is more precise in that I can just choose a part of a line.

I just tried using the check boxes. I can mark an item as done, but how do I get it to display as strikethrough? I have Rich Markdown installed.

Enjoy!!

That's fine with me, but when you choose to use markdown in the first place ... with all it's "markers" and extra syntax, why do you want anything transformed into convenient, easy to use buttons ?

Fair question--which is why I merely ask for things like a button rather than demand it. (Actually what I really want is the Ctrl-T that I used to use so often in Evernote.) Joplin is unlike any program I've ever used. In fact, it's my first exposure to markdown and it came only a few months ago. I'm actually enjoying the feeling of being a bit techy in learning to use some markdown, but because markdown isn't the top reason why I like Joplin or something that I'm fully comfortable with yet, I'm not wedded to a purist markdown use of Joplin. So if there are non-essential features like a strikethrough botton or shortcut that developers don't mind adding to give different type of users choices, then I'm happy to have them. My guess is that every Joplin user will have features/uses that he really appreciates, as well as some that he never uses--which is probably the case for any app or product. Maybe Ctrl-T will come, maybe not. In the meantime, I will try to become more familiar with markdown.

1 Like

If you like to be really techy, you could create the shortcut key using AutoHotKey scripting. It's an easier option that actually learning to code plugins, but there is still a bit of a learning curve.

Thanks. I'll look into it. I like anything that involes keyboard shortcuts. Is AutoHotKey much more complicated than Keybreeze, which is the utility that I wouldn't be able to function without?

Just took a look at Keybreeze. I would say yes, it is more complicated. To do what you want to do using AHK, I think this script would work:

^`::
WinActivate
ClipSaved := ClipboardAll
Clipboard =
Send ^x
ClipWait 1
Send {raw}~~
Send ^v
Send {raw}~~
Clipboard := ClipSaved
ClipSaved =
Return

What it does is assign ctrl ` to the hotkey in the first line. Then whatever you have selected when you use the hotkey will be cut to the clipboard. Then ~~ will be outputed, clipboard contents is pasted, and ~~ is outputted. I already had this (with different markup) for a different project. Exactly how it works with the clipboard I can't remember. AutoHotKey has a great forum. If you can't get something working, there are usually friendly people there who can fix your code.

Markdown is well suited to these scripts because you are just enclosing things in pure text.

Regular disclaimers apply. Use at your own risk!

4 Likes

I may never understand how it works, but it works like a charm. Thanks!

I've learned that by changing ~~ to **, I can make the selection bold (though not needed since Joplin already does Ctrl-b for bold. But I'll do some research/experimentation to see if I can do highlighting in various colors or change the font color using AHK.

Cool! I'm so glad it works for you. I may have understood it at one time, but I don't now either.

I wonder if we should have an AHK thread.

From my (admittedly limited) understanding of AHK it essentially does Ctrl+X, insert ~~, Ctrl+V, insert ~~ so you end up with the text that was selected wrapped in ~~

It also saves whatever was in the clipboard before and restores it afterwards.

I don't mean to turn this into a discussion about AutoHotKey, but I'm finding it a nice complement to Joplin since it gives me what I really want--keyboard shortcuts--rather than buttons.

So far, I can make any selected text strikethrough, highlighted, red font. I suppose I can also make it bold+red font or any other combination I want.

And if I know that I want the upcoming text to be red, then using Keybreeze's text function, I can mark the beginning of a section that I want to be red font, as well as end the section. That way, I don't have to type < font color=red > at the beginning or < /font > at the end. (I'm sure I can do this using AHK, but Keybreeze is easier for this kind of text insertion.) Not a big deal, but these are the small efficiencies that bring a bit of happiness to working all day at the computer.

Would customizable keyboard shortcuts for formatting be welcome in Joplin? For sure. But for now, I have a very usable workaround. Thanks again for the tip @whitewall.

1 Like

Your very welcome. I'm glad the time I put into figuring out the AHK script is paying off. I do think that markdown and AHK have an affinity for each other.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.