Preventing the WYSIWYG editor from removing extra syntax

Hello,
I read and understand the warning about the removal of non-MD-compatible tags when switching to the WYSIWYG editor. However I just accidentally clicked on it (having the Note Link System I wanted to click in the Referers panel, but due to late night hours, sleepy, I clicked to the WYSIWYG icon) and, in a hurry, wrote a few words. The file got updated. All "anchors" (link IDs) are now gone. Also, I experimented with the <a id="xxx"> next to the {} syntax - which was also lost.

Would it be possible to either:

  • add an option (setting) to disable the removal of non-MD tags (at the cost of displaying them)? It's up to the user to mix them and display in WYSIWIG which doesn't understand them - but at least doesn't destroy them

  • or display a message box kinda "non-standard tags were detected and will be removed from the note. Continue?". Yes, I know a warning message is displayed, but when someone accidentally switches it, there will be no way to revert.

  • or to add an option to hide the entire editor switcher? I found a topic when it can be hidden via CSS, but it didn't work for me (after restarting the editor it's still here).
    EDIT: after 8th or 9th restart, finally it worked and the entire switcher disappeared. So OK, it works - but maybe it could be "exposed" as a switch in the options panel?

l love Joplin, but this issue bothers me, because restoring all the links now is a bit problematic (80+ links affected). If the option preventing the WYSIWYG editor from extra tag removal is problematic for implementation, maybe just a global setting to just hide the editor switcher?

It's just too easy to lose part of the work either accidentally or if the users simply forgets about this issue (despite warnings displayed). A very, very simple solution with manual blocking of the WYSIWYG editor (a switch) would address this problem very well.

EDIT: I found a plugin "Disable markdown renderer" but it does too much, I need only to disable the WYSIWYG editor, not the MD preview.

I haven't seen that button for years now for this exact reason.

Add this to your userchrome.css file:

/* removes the WYSIWYG button */
div.editor-toolbar div button {
    display: none !important;
}

To edit that file …
Tools > Options > General > Appearance > "Custom stylesheet for Joplin-wide app styles"

To take effect, you will have to fully restart the application (not just close it and open it; you have to quit it then start it again).

Cheers.