Toggle-editors by keyboard

Continuing the discussion from Shortcut for toggle markdown editor/wysiwyg editor:

In mentioned thread a solution is offered which makes you add a keyboard shortcut to the respective json files. Unfortunately this does only work when

  • the markdown editor is used (you cannot switch back to the markdown editor with the same command)
  • the focus is on the note (and not on the sidebar or the notes lists).

If you do frequently work with both editors a fully functional keyboard command would be very handy.

4 Likes

Not a complete solution but as a workaround you can do that via command palette (ctrl+shift+P > ToggleEditors).
Additionally, a more fundamental solution of similar feature requests could be achieved with addition the palette commands to the list of adjustable shortcuts.

Earlier was requested here but didn't get much traction at the time:

3 Likes

I think anybody who performs repeated tasks on any application comes sooner or later to appreciate keyboard shortcuts (ks) over mouse/menu commands. And Joplin is no exception to this. Which commands are most valuable is hard to predict by the dev, so his choice of ks will necessary be sub-optimal. The best you can hope for : a way to add a ks to any command available.

1 Like

I am also voting to get keyboard shortcut to make toggleEditors work globally...
Wonder if there is any movement on this issue since January?

I would also benefit from the keyboard shortcut. It could be Ctrl+M for example.

I'd like to bring this thread back. There is up to version 2.10.4 no way to switch from the md editor to the WYS editor (or back) with either a menu command OR a keyboard shortcut.
Of course this might seem harmless and unnecessary, but for some users this means

  • you type (as I always do) in the WYS editor
  • next you need a feature that is only available in MD
  • goto mouse/touchpad -> point precisely at the icon top right -> click
  • back to keyboard
  • type in MD
  • back to mouse
    etc etc etc

It is hard for me to believe that nobody misses at least the menu command (ideally with a related keyboard shortcut). No other command in Joplin is only accessible by just one small icon and nothing else.

PLEASE comment !

4 Likes

Just realize there is another reason to think about this. Two very nice plugins - inline tags & quick links - both only work from within the MD editor, but remain useless in the WYS editor. Now imagine if we had a simple keyboard shortcut ...
One could quickly switch editors, create a new tag or link, and switch back.
This all speaks for implementing an easy shortcut to switch from one editor to another.

This would be number 1 on my wishlist. I also don't understand why there's no keyboard shortcut to change quickly between two fundamental ways of working in Joplin.

3 Likes

Could it be that there is a ... built-in limitation (in electron, Joplin, or other) which allows the devs to implement a clickable switch to go from one editor to another, BUT does not allow them to provide a key-stroke to do the same thing ? Just wondering, since this request seems so simple, and obviously useful.

1 Like

any news on this?

I have created a simple Joplin plugin to address this. It adds a command in the View menu to toggle between Markdown and WYSIWIG editors, and, as suggested by one user, it adds the keyboard shortcut Cmd+G (or Ctrl+G on Windows) to this command. If all went well, it should be available soon in Joplin Plugin Repository. I hope it helps!

7 Likes

Nice workaround, thanks rafjaf for making this👍

I would suggest to add release (to add JPL file in the repo),
because I had to clone repo and build the plugin before I can add it to Joplin,
which can be difficult for regular users to do it.

Thank you @MrDeeb. Actually, since it is in the official Joplin Plugin Repository, you only need to go to the Joplin Preferences, Plugin tab, and type the name of the plugin : you should be able to add it immediately without having to build it yourself. Moreover, the plugin is already built in JPL and can be downloaded from the Joplin Plugin Repository by clicking on the download button

1 Like

Thank you for effort for this much needed update but it works only one way for me which makes all the functionality go away. Is that the case for you also or is it just me if it is not just me is there a solution for this?

Probably you are using the beta markdown editor in which Cmd+G is already assigned to search and replace. But if you install the latest version of Joplin (above 3.0), the keyboard shortcuts for this editor can be reasigned, so now it works both ways. Tell me if it works for you. Alternatively, I think another keyboard shortcuts can be chosen.

Never thought my completely random choice of keybinding for demonstrating a proof of concept would come back like this lol, I only picked it as the first one I saw that didn't have an existing binding and didn't use multiple modifiers.

Wait. Why are builtin commands not listed in Keyboard Shortcuts?

If users can't find how to execute commands through the GUI, should they expect to find that out by magic? Many users haven't used Discourse, the Command Palette, or plugins for that matter.

This isn't uncommon, there are plenty of commands that most wouldn't (and in some cases shouldn't) bind to keyboard options - it isn't meant to be a place to discover all commands within the system - many of these aren't meant for casual use.

I have to admit I thought the command palette was in the documentation but I can't seem to find it, I wonder if an entry should be created for it.

Most builtin commands are already listed in Keyboard Shortcuts. Creating a Command Palette entry would be great to find which commands need shortcuts or explain why some commands don't.

You might be interested in an issue that was raised a while ago - some commands simply don't work in a global scope which would also make them not work correctly when bound to an accelerator. Desktop: Command "moveToFolder" when bound to an accelerator only works when focus is on codemirror editor · Issue #6063 · laurent22/joplin · GitHub