Warning: If you switch between the markdown and WYSIWYG editor, certain kinds of data washes away

A warning to certain types of users (doesn’t effect folks that only use the WYSIWYG editor) and a request for comment.

Maybe need some way to disable the WYSIWYG editor? Frankly, I never use it, but this is what happened today:

I have a document. I commented out a bunch of stuff in it. I had some “metadata” commented out as well. Quite a bit actually.

I switch to layout mode to see how things were looking. Then I switched back, but I was confused … because it didn’t switch back. Then I realized, “Oh, I must have hit Code View instead.” And then I saw a typo, fixed it, and then decided to switch back to markdown mode cuz … markdown is how I was editing this document.

Then … CRAP! a page worth of commented out experimental text and metadata vanished … poof! gone.

So … is there a way to turn this thing off? I can’t seem to determine a means to do so. Does it nuke other data as well?

-t

UPDATE: 1.There is a solution to get back the data (see Laurent’s comment on Note History … I was in a rush and the text was not critical so I didn’t use this, and 2. There is a means to disable access to the WYSIWYG; see dpoulton’s comment below.

1 Like

Can’t you recover with note history feature?

But it’s true it’s not ideal as it is, and no it’s not possible to disable it. I’d prefer a solution where the editor can edit the note in a lossless way, leaving intact the markup that it doesn’t handle.

You can set Joplin to use the "traditional" markdown editor / viewer and then hide the "code view" button so you cannot accidentally press it and trigger WYSIWYG.

Explained here:

As WYSIWYG is no longer an option in the View > Layout Button Sequence menu it is, to all intents and purposes, disabled.

I'm not "anti-WYSIWYG" I just prefer the markdown / viewer pane combo to create and edit notes.

1 Like

@laurent Yeah, I was going to do that. I was in a rush though to hand the core text to someone, so I just recreated the meta information and will worry about the lost text later. It was not earth-shatteringly important, but annoying.

@dpoulton Thanks.

1 Like

It would be great if the wysiwyg-editor wouldn't delete the xml-comments. At least the table-calculate-plugin would be more usefull then. Data-entry is much easier in wysiwyg.

From another perspective, maybe there should be a guideline for plugins how to add extra meta-information, which won't be deleted. Maybe they should be using markdown comments (I'm a noob, so could maybe be done better)? (gitlab)
{::comment}
This is a comment which is
completely ignored.
{:/comment}

I sometimes do comments like this:

[comment]: # "This is my comment. There are many others like it, but this one is mine. My comment is my best friend. It is my life. I must master it as I must master my life. Without me, my comment is useless. Without my comment, I am useless. I must write my comment true. I must comment with more clarity than other commenters, who are trying to kill me."

:slight_smile:

2 Likes