How to change markup from html to markdown?

I imported notes from Evernote, and they are specified as being in HTML markup. How can I change an existing note to markdown markup ?

1 Like

You should be able to choose that when you import, mine are all Markdown.

Oh I see. yes. Thank you :slight_smile:

do you know if it’s possible to change type retroactively ?

1 Like

Sorry no I don't, but you can just delete what's there and import again :slight_smile:

1 Like

Darn. I don't have the original notes anymore. I tried copying the rendered note and then pasting it over the html so I could rewrite it in markdown without losing note metadata ( especially original date created ) but no dice.

I'll wait until you can change the document formatting from HTML to markdown. The feature is bound to be added someday.

Not sure, if this is even on the list of planned features.

My vote for having this feature in Joplin.

I tried to change it directly in the database and it works.
For all those who are interested:

  • In info panel I copy the note ID
    image

  • Open with an SQLITE frontend (I used SQLiteStudio) and:

    1. Select the table "Notes";
    2. Select the tab "Data";
    3. Filter the view to find the note
    4. change "markup_language" from "2" (HTML) to "1" (Markdown)
    5. Commit

Now the note is rendered as mardown.

N.B. I thin that would be better if you close Joplin before modify the database.

Bye!
:warning:[UPDATE]: READ LAURENT'S WARNING BELOW!:warning:

Note that it's likely you'll lose data or get sync issues sooner or later if you directly modify the database. For what you want to do I think you can simply copy and paste the HTML note content into a new note.

1 Like

Ok, I should stop thinkering with the database... :sweat_smile:

Only one question: I can understand the risk with the sync, but how I can damage the database if I change only this field (with Joplin closed, obviously)?

I prefer not to say because then you might be tempted to update your method, thinking it's now safe, but probably still isn't. It's very hard to know the impact of changing a random field in the database - it might work, or it might break in a very subtle way, so we prefer not to support this.

With this reply ou are treating me like a child... but I really can understand, you don't want to "support" bad habits. Or better, you don't want the wrong way of using Joplin to damage his reputation.

But, from the technical point of view I'm still curious...

P.S. Before your reply I yet updated my previous post to respect your advice.

I can't speak for Laurent, obviously, but I don't think he's saying that he is withholding information from you. I think what he was basically trying to convey to you that there is no way of telling what could happen. Best way to find out is just do it... and hope for the best. If you are lucky, all will go well. If things break, don't come knocking on Joplin's door :smiley:

Don't get me wrong, it's nothing against you. Instead I have in mind the fact that there are many other users who could find this thread, and other similar threads. Then if I start answering these questions, over time it will become a common thing to do to directly modify the db, and I want to avoid this.

I see the forum posts as a kind of documentation, and I simply prefer not to document unsupported ways to use the software, so really it's nothing personal.

Don't worry! It's OK!
I'm sorry if I wasn't clear, my english isn't as good as I'd like, but I completely understand your reasons.

I'll wait for life to bring us together somewhere, and you will explain it to me over a beer. :wink:

1 Like