# How to set the default markup language to HTML (instead of markdown) for new notes?

**URL:** <https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171>\
**Category:** Support\
**Created:** [2 September 2022 15:01 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171 "2022-09-02T15:01:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jippi](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jippi](https://discourse.joplinapp.org/u/Jippi)\
**Post date:** [2 September 2022 15:01 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/1 "2022-09-02T15:01:03Z")

</div>

Hello,

I find Joplin Desktop application awesome, but I'm not interested in using Markdown in my notes as it's too limited compared to HTML.

I found out that it's possible to have the markup language of the notes set to HTML(_). Thanks to this setting Joplin doesn't try to convert the notes in Markdown which among other things allows me to keep my tables as HTML. But I am not able to set the markup to HTML when I create a new note from within the desktop app_.

- How can I set the markup language of a new note created in the app to HTML?
- How can I set the default markup language to HTML?

Thanks a lot for your help!

* * *

\*) The markup language of a note is set to `html` when I import files with the `.html` extension (via File\>import). I can also set the markup language `html` when I create a note [via the API](https://discourse.joplinapp.org/t/creating-an-html-note-with-html-content-via-the-api-post-keep-getting-errors/27023/2) (by setting `markup_language="2"`). But it isn't practical to import a file or use the API each time I want to create a new note.

* * *

Desktop application  
Joplin 2.8.8 (prod, win32)  
Client ID: f493c04dd4c2456593b807a1a1a6d505  
Sync Version: 3  
Profile Version: 41  
Keychain Supported: Yes  
Revision: c2a6a13

Window 10 version 21H1

---

<div class="post-metadata">

**Author:** ![Imperial\_Squid](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/imperial_squid/32/15471_2.png) [@Imperial\_Squid](https://discourse.joplinapp.org/u/Imperial_Squid)\
**Post date:** [2 September 2022 17:44 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/2 "2022-09-02T17:44:10Z")

</div>

Markdown is just shorthand for html, it all gets converted into html in the backend anyway so you can just write html as is 👌

That said, it might be worth your time to get used to markdown for the simple stuff anyway since there's no real difference under the hood and markdown is quicker! Using both is an option for what you find too limited in markdown 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Jippi](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jippi](https://discourse.joplinapp.org/u/Jippi)\
**Post date:** [2 September 2022 19:40 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/3 "2022-09-02T19:40:36Z")

</div>

Thanks for you answer but there are differences in how the notes are processed when switching from the note editor to the rich text editor. For example, when the markup is set to markdown, the HTML tables are converted to markdown (which messed up with my tables are they are too complex for markdown, ie merged cells...) but not when the markup is set to HTML. That's why I really need to be able to set the markup by default to HTML.

---

<div class="post-metadata">

**Author:** ![Imperial\_Squid](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/imperial_squid/32/15471_2.png) [@Imperial\_Squid](https://discourse.joplinapp.org/u/Imperial_Squid)\
**Post date:** [2 September 2022 20:12 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/4 "2022-09-02T20:12:28Z")

</div>

If all you need is merged cells, multimarkdown tables can do that, you can enable them in the settings (`Tools > Options > Markdown`, it's at the bottom) and the syntax is [here](https://fletcher.github.io/MultiMarkdown-4/tables.html).

---

<div class="post-metadata">

**Author:** ![Imperial\_Squid](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/imperial_squid/32/15471_2.png) [@Imperial\_Squid](https://discourse.joplinapp.org/u/Imperial_Squid)\
**Post date:** [2 September 2022 20:17 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/5 "2022-09-02T20:17:38Z")

</div>

Also what do you mean by "the markup is set to HTML", where are you looking in the settings, I don't see an option like that anywhere?

---

<div class="post-metadata">

**Author:** ![Jippi](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jippi](https://discourse.joplinapp.org/u/Jippi)\
**Post date:** [2 September 2022 20:28 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/6 "2022-09-02T20:28:07Z")

</div>

The table with merged cells was just an example. I use many more features in my tables so I really need them to be set as HTML.  
To know if a note is markdown or HTML, click on the info symbol on the top right corner.  
This is markdown:

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/c/c3312f794ae442c986dd65a20675648729e96617.png)  
This is html (this note was created via the API):  
 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/a/a1230824c9f4465a9750fde41763ccbafb27e204.png)

---

<div class="post-metadata">

**Author:** ![Imperial\_Squid](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/imperial_squid/32/15471_2.png) [@Imperial\_Squid](https://discourse.joplinapp.org/u/Imperial_Squid)\
**Post date:** [2 September 2022 21:11 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/7 "2022-09-02T21:11:44Z")

</div>

Made a pair of notes and I see the difference now as well as your problem!

I will mention that duplicating a note keeps the markup type as well so keeping an empty note is an option?

But in terms of a better solution like a keyboard shortcut, I doubt you'll find it unless the devs are willing to help, Joplin is a markdown note taking app first and foremost, this feature seems pretty niche as far as I can tell... 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![quicksite](https://avatars.discourse-cdn.com/v4/letter/q/2bfe46/32.png) [@quicksite](https://discourse.joplinapp.org/u/quicksite)\
**Post date:** [3 September 2022 12:24 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/8 "2022-09-03T12:24:50Z")

</div>

(post deleted by author)

---

<div class="post-metadata">

**Author:** ![Daeraxa](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/daeraxa/32/6172_2.png) [@Daeraxa](https://discourse.joplinapp.org/u/Daeraxa)\
**Post date:** [3 September 2022 13:39 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/9 "2022-09-03T13:39:57Z")

</div>

Please keep it civil, I very much doubt anything malicious like that was intended. The app is indeed designed to be markdown based for actual note taking as well as storage - the HTML mode is mostly used for lossless Evernote imports and website clipping.

The ability to manually switch modes hasn't come up very much before but it is something I have thought about before as it is really pretty easy to swap the types in the database or do what @Jippi has via the API. One of the reasons I was wondering about it was for the richtext editor as it has features that are lost when converting to markdown which is something that does come up quite often.  
However the major drawback here is that notes written in pure html will be much more difficult to edit on mobile.

An idea that I also was thinking about would be a way of marking a blocks of text or other elements which the markdown conversion will then ignore which would go some way to solving the issue.  
For example if you made a fancy table in the richtext editor (or even manually) then if you were to wrap it in a special tag or give it a class (Joplin already has `class="jop-noMdConv"` which it adds to some elements, such as resized images so it doesn't go back to markdown).

---

<div class="post-metadata">

**Author:** ![Imperial\_Squid](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/imperial_squid/32/15471_2.png) [@Imperial\_Squid](https://discourse.joplinapp.org/u/Imperial_Squid)\
**Post date:** [3 September 2022 14:49 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/10 "2022-09-03T14:49:35Z")

</div>

You need to cool your jets mate, I'm just a fellow user trying to answer a question...

Never said it was a better way, just trying to offer literally any kind of solution, I don't use HTML notes so I can't help there but I do use multimarkdown occasionally so it doesn't hurt to ask if that works instead. I can't give them advice about HTML notes if I don't use them myself...

You're telling me to give a yes/no answer when _I don't know if a solution exists_, I'm just exploring options with them to see if there's something that will work in the mean time...

---

<div class="post-metadata">

**Author:** ![Jippi](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jippi](https://discourse.joplinapp.org/u/Jippi)\
**Post date:** [3 September 2022 20:25 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/11 "2022-09-03T20:25:10Z")

</div>

Thanks for your answer.

> [@Daeraxa](#):
>
> However the major drawback here is that notes written in pure html will be much more difficult to edit on mobile.

I don't mind if my notes are very long because of the HTML tag/styling. I much prefer this to not having the full power of HTML.

> [@Daeraxa](#):
>
> An idea that I also was thinking about would be a way of marking a block of text or other elements which the markdown conversion will then ignore which would go some way to solving the issue.

This would not be a good solution as it would be too easy to delete the markers for those blocks (be it a tag, an html class...) without paying attention and then the content of those blocks would be converted to markdown and a lot of formatting and even data could be lost. I would be much easier to simply let the user choose the default markup of the notes by having a general setting. So, the user could choose to have markdown by default, or HTML.

---

<div class="post-metadata">

**Author:** ![Jippi](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jippi](https://discourse.joplinapp.org/u/Jippi)\
**Post date:** [3 September 2022 20:32 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/12 "2022-09-03T20:32:30Z")

</div>

> [@Imperial\_Squid](#):
>
> I will mention that duplicating a note keeps the markup type as well so keeping an empty note is an option?

Thanks for investigating it and finding this solution. I didn't know about that. It's better than importing a file/using the API but still very cumbersome.

> [@Imperial\_Squid](#):
>
> Joplin is a markdown note taking app first and foremost, this feature seems pretty niche as far as I can tell

The thing is... everything is already there, it's just that it's not accessible to the regular user but a simple setting could fix this. It would greatly improve what the users can do with Joplin. I almost gave up on Joplin because of the lack of HTML support. I just saw by chance that there was this markup. Having an easy way to have full HTML support would not change anything for the users who want to use markdown, but could bring a lot of new users and with minimal change for the Joplin team (as HTML is already "secretly" supported)

---

<div class="post-metadata">

**Author:** ![Daeraxa](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/daeraxa/32/6172_2.png) [@Daeraxa](https://discourse.joplinapp.org/u/Daeraxa)\
**Post date:** [3 September 2022 20:40 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/13 "2022-09-03T20:40:33Z")

</div>

Just thinking, if `markup_language` is updatable via the data api then it will be easy enough to write a plugin that allows you to convert from one to the other. At that point it would be as easy as using any other command which could also be bound to a UI button, menu item or shortcut.

> [@Jippi](#):
>
> (as HTML is already "secretly" supported)

I don't think its really a secret, its literally [part of the spec](https://spec.commonmark.org/0.30/#raw-html).

---

<div class="post-metadata">

**Author:** ![Jippi](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jippi](https://discourse.joplinapp.org/u/Jippi)\
**Post date:** [4 September 2022 19:46 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/14 "2022-09-04T19:46:24Z")

</div>

I think that it's pretty risky to rely on a plugin for such a fundamental thing as the default markup language (I am not trying to convert my markdown note into HTML note, I am trying to get all my future new notes to be HTML). I just don't understand why the full HTML support (without any markdown filtering ― which is already available via import/API), is not made available via the Joplin UI (which is what I meant by "secretly supported").

---

<div class="post-metadata">

**Author:** ![Imperial\_Squid](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/imperial_squid/32/15471_2.png) [@Imperial\_Squid](https://discourse.joplinapp.org/u/Imperial_Squid)\
**Post date:** [4 September 2022 21:05 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/15 "2022-09-04T21:05:07Z")

</div>

I think what @Daeraxa meant was that you could have a plugin to change the markup type of the note in the backend, the processing would still be the same but it would be an easier way to switch any notes between the two types rather than having to import a .html file/copy an existing note/etc

---

<div class="post-metadata">

**Author:** ![Daeraxa](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/daeraxa/32/6172_2.png) [@Daeraxa](https://discourse.joplinapp.org/u/Daeraxa)\
**Post date:** [4 September 2022 21:40 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/16 "2022-09-04T21:40:32Z")

</div>

Indeed, I was thinking that (if possible which I haven't actually checked yet, a plugin could access the data API and set the `markup_language` field and swap it on command.  
If you wanted to get fancier with it then it could have an option to always set it to HTML by watching for notes being loaded or always set it on newly created blank notes etc.

Ultimately it is a fairly niche request judging by how often it has come up and I think there is a better solution in there somewhere that won't lead to problems down the line that haven't been foreseen.

Edit: Yes, it definitely is updatable to HTML (i.e. `"markdown_language": 2` using the data API, no need to define a note from scratch. It also does have some weird side effects, for example if you swap to the richtext editor then it does some odd things with the font colour. I was using the dark theme, the text is black until you reload the note.

---

<div class="post-metadata">

**Author:** ![Daeraxa](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/daeraxa/32/6172_2.png) [@Daeraxa](https://discourse.joplinapp.org/u/Daeraxa)\
**Post date:** [5 September 2022 16:07 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/17 "2022-09-05T16:07:33Z")

</div>

Just out of curiosity if nothing else I've created a plugin with a command that should swap the note type.

The command to run is `toggleMarkupLanguageType` and once the plugin is installed you can do it from the command palette.

I haven't published this yet as I'd like to know if this actually breaks anything before I unleash it on the world so currently the way to install it would be to download the jpl from my github repo [Release v0.1.0 · Daeraxa/joplin-plugin-toggle-markup · GitHub](https://github.com/Daeraxa/joplin-plugin-toggle-markup/releases/tag/v0.1.0) and install it manually in Joplin, preferably in the dev environment as I accept no responsibility for breaking anything.  
If you decide to install on your main environment then please make sure you back everything up first.

Code wise it doesn't really do anything scary (in theory). It just grabs the selected note's ID, checks its `markup_language` type then sets it to whatever it currently isn't.

---

<div class="post-metadata">

**Author:** ![roman\_r\_m](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/roman_r_m/32/3297_2.png) [@roman\_r\_m](https://discourse.joplinapp.org/u/roman_r_m)\
**Post date:** [5 September 2022 18:04 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/18 "2022-09-05T18:04:53Z")

</div>

If you're comfortable working with the underlying database directly, this should set the default markup language to HTML and change it for all existing notes as well:

```sql
ALTER TABLE notes DROP COLUMN markup_language;
ALTER TABLE notes ADD COLUMN `markup_language` INT NOT NULL DEFAULT 2;
UPDATE table_fields SET field_default=2 WHERE field_name='markup_language';

```

Obviously make a backup first.

---

<div class="post-metadata">

**Author:** ![Jippi](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jippi](https://discourse.joplinapp.org/u/Jippi)\
**Post date:** [5 September 2022 20:01 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/19 "2022-09-05T20:01:49Z")

</div>

@roman_r_m , that's awesome! Thank you so much! Please add this as a setting in Joplin. It won't change anything for all the users who want to keep markdown as they default markup but for those who want to have full HTML, they could just activate this setting without being afraid of tinkering with their DB. This would bring a lot of new users to Joplin (once again, I also gave up on Joplin when I saw that all my HTML tables were ―badly― converted to markdown). It's not a massive change for you and would be a huge advantage for Joplin!

@Daeraxa, Thanks for taking the time to write a plugin! I tried it and it was nice for converting my HTML note that add the markup language set as markdown. One drawback is that it has to be done for each note separately but at least the option is here now. Also, I am very happy because I have an example now of a simple plugin and can start experimenting further! So, thank you!

---

<div class="post-metadata">

**Author:** ![roman\_r\_m](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/roman_r_m/32/3297_2.png) [@roman\_r\_m](https://discourse.joplinapp.org/u/roman_r_m)\
**Post date:** [5 September 2022 21:19 UTC](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171/20 "2022-09-05T21:19:28Z")

</div>

> [@Jippi](#):
>
> Please add this as a setting in Joplin. It won't change anything for all the users who want to keep markdown as they default markup but for those who want to have full HTML, they could just activate this setting without being afraid of tinkering with their DB.

I think so far you're the only one who asked for this.

[Next page](https://discourse.joplinapp.org/t/how-to-set-the-default-markup-language-to-html-instead-of-markdown-for-new-notes/27171.md?page=2)
