Import from Evernote discards my tab-indents

New user here, trying to migrate from Evernote 6.25.3 to Joplin 2.12.15 on Windows-32.

On Evernote I used Ctrl-M to indent blocks of text as an aid to visual organization. Exporting as ENEX and importing to Joplin discards this formatting. I believe I saw that Markup doesn't include indenting.

Am I up the creek then and my indents are history? Thanks....

@Lyle welcome to the forum.

Not being an Evernote user I am not sure what Ctrl+M actually does / looks like.

However with Markdown you could use the "blockquote" marker (>) to indent text.

> Aliqua qui laborum tempor dolor ex incididunt deserunt occaecat reprehenderit est dolore Lorem elit dolor do. Qui incididunt eu minim non proident consequat quis dolore laboris cupidatat consequat eu non officia sint nulla esse ut consectetur commodo.

Aliqua qui laborum tempor dolor ex incididunt deserunt occaecat reprehenderit est dolore Lorem elit dolor do. Qui incididunt eu minim non proident consequat quis dolore laboris cupidatat consequat eu non officia sint nulla esse ut consectetur commodo.

I believe that if the vertical line and / or background is not wanted it could be globally modified / removed using custom css.

I don't know if this helps, but in the exported file, the start of the indented section has markup like this:

"div style="margin-left: 40px; text-align: start;"

Every line after that is indented, until the end of the indented section has this:

"div style="text-align: start;"

But the resulting Joplin lines all begin at the left margin

Thanks for any advice....

The Blockquote markdown does indent but not by much.

If you add the below to userstyle.css (Tools > Options > Appearance > Show Advanced Settings > Custom stylesheet for rendered Markdown) ...

blockquote {
    border-left: none !important;
    /* removes the left border - !important required for the rich-text editor*/
    margin-left: 40px;
    /* makes the left margin 40px*/
    text-align: start;
    /* aligns the text to the left (or the right for RTL text)*/
    opacity: 1;
    /* darkens the blockquote text from the default of 0.7 */
}

... whenever you use a blockquote mark (>) it will format the text like this:

Will that help you?

EDIT:
You must fully Quit (File > Quit) and restart Joplin for custom css to take effect.

Also, ignore the colouring of the text on the left, I've got some customising in place.

I'm sort of following you here dpoulton. But that looks like a way to indent text in new Joplin notes I write, and won't help to correctly render existing indents from the Evernote export, right? Thanks again...

Sadly, that's true. I was trying to find a way to get something similar in Joplin to the indenting you are used to.

The last time I looked at an Evernote file it was an awful mess of tags. I can only suggest seeing if you can do a find / replace on the <div style="margin-left: 40px; text-align: start;"> tag and then see whether it imports. If you have a lot of notes just try it on a small ENEX export of several that you know contain indents.

Maybe someone here with a better knowledge of ENEX files has a suggestion?

1 Like

The only thing I can think of would be to modify the ENEX XML data directly.
It looks like (even in what I think is the absence of such a feature in Evernote) that the ENEX -> MD import actually does support reading a blockquote tag from within the <content> tag which should (if I remember correctly) be HTML.

I have no idea if it would actually work but you could try making a copy of your ENEX and editing it to change one of those indented divs with a blockquote.

1 Like

Does the ENEX content provide some additional info to identify the block of text? If there is, maybe we can add tabs before each line when importing. The margin-left: 40px could help to identify these lines but that could cause false positives. Could you maybe share an example enex file so that we can check?

Oops....
I just created an Evernote test note inside a notebook, with the intention of posting the enex file here.
I had been importing notebooks using "ENEX - Evernote Export File (as Markdown)"
For a change I though I'd try "ENEX - Evernote Export File (as HTML)" and it worked!
The resulting Joplin note preserved the indentations from Evernote.

Thanks to all, and sorry for the false alarm.....

The problem with this means that you won't be able to easily edit your notes in Markdown once imported as HTML. Some of it will work in the rich text editor but if you use the Markdown editor it will just be HTML.

And I found that when importing as HTML the ENEX file's HTML does not define a font. So in the Markdown editor viewer pane all the notes displayed using a default serif font like Times New Roman. To change this I had to add a stylesheet to every note. Also new notes will be made using markdown so the the way they look will not be the same.

In a quest to "achieve markdown" I created a very simple ENEX file for a single note. There is no additional info to identify the indented block of text. I did find that replacing <div style="padding-left:40px;"> with <div>> (Note that there are TWO > (the second is to add a blockquote marker after the <div>) imports and works (at least on the very simple ENEX file I tested this on).

As @laurent says, the danger is that the div style is used for other formatting.

Before you commit youself to HTML notes you may want to see if this method is viable. It is a bit of a long shot but may pay dividends later if it works.

Export a decent number of your notes, with and without indents, into an ENEX file. Open it in a text editor that lets you search and replace all and search for <div style="padding-left:40px;"> replacing it with <div>>

Import the ENEX into Joplin as MD and see if you have correctly formatted notes or a mess!!

You can always delete the imported notes or even reset Joplin.

I really wanted to get the migration from Evernote done. So I went ahead and imported all the enex files as markdown, and figured I'd deal with any loss of formatting later if at all. Thanks everyone for your help....

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.