Homepage    |    GitHub    |    API    |    FAQ

A way to paste text from Word and keep formating?

Hi, I am new to Joplin.

I have quite a lot of files in Microsoft Word that I would like to have pasted into Joplin. But I can't seem to paste text properly. The formatting gets all weird once I leave my note, at first it is fine.
I am only using The Rich Text editor, not markdown.

Any tips? - if it is even possible? (Any plugins that does this?)

Thanks!

There's an ongoing project to develop a plugin that'd allow pasting content from different sources: Paste Special Project - #9 by coderrsid

2 Likes

What part for example is not pasted properly, do you have an example? But in general Word is obviously a much more capable editor than Joplin, so you'll never be able to 100% import everything, but basic formatting normally should be pasted properly.

1 Like

First photo shows right after import, the second after closing and opening the note.

Its basic formatting, bullet points which get moved.

1 Like

Looks very interesting! Would love an update when it's available!

@laurent also, the arrow format in word (-->) turns into รก when pasting into joplin.

1 Like

If I copy and paste that kind of document from LibreOffice it works fine and bullet points remain bullet points. Probably the issue is that Word generates HTML that's not quite standard so part of the formatting gets lost afterwards.

Have you tried exporting the file as HTML and importing it into Joplin?

Sorry for being a noob at this, but how do I import a HTML file into Joplin? @laurent

I don't know if this helps but I use a Word plugin called Writage to export Word files as markdown and then copy/paste or import the resulting markdown files.

Here is an article about Writage (which I have nothing to do with except as a user): How Microsoft Word Can Be Your Favorite Markdown Editor

It works both ways. I can also copy/paste a markdown note from Joplin into Word and have it work almost seamlessly.

4 Likes

@MisterKelly this worked! Thanks a lot! It's surely a little bit of a hassle to not be able to copy paste text from Word into Joplin, but this will make do. For my next semester I am planning to write all my notes in Joplin instead on Word so that won't be a problem.

Any tips for a beginner?

I'm a Mac user, and I have no problems copying text from Word to Joplin. Your mileage may vary if you're using Windows, of course... But here is an example from what I see on my Mac.

Note that I'm using macOS Big Sur in Dark Mode, and Joplin with the Nord theme (a dark theme as well). Microsoft Word, therefore, shows the toolbar and menu bar light-on-dark, but the 'main window' is black-on-white; when copying this over to Joplin, obviously the colours get reversed. But that has nothing to do with Joplin โ€” it's just the way my own Mac is configured. If you have everything in Light Mode, you should see exactly the same thing on both Word and Joplin.

Secondly โ€” Markdown has no concept of fonts, so, naturally enough, these are not copied; Joplin is rendering what it got from Word with whatever font has been set by default.

I'm using one standard template that comes with my version of MS Word โ€” no changes, straight from the template (it's called Research Paper and comes with the Microsoft 360 version of Word for the Mac โ€” I have no idea if it's a template that comes with all possible versions of Word, but the point is that it's something quite standard).

Set Word to View > Web Layout. Here is what I get:

Next, enter Joplin, switch to the Rich Text Editor, and copy:

Not too bad, right?

  • Images are copied exactly 'as is' (more on that below)
  • Heading 1, 2 etc. are preserved
  • Lists seem to be preserved if they are 'default' lists (sorry, I didn't experiment with very fancy lists... just the one that comes with this rather simple template) โ€” but see below
  • Tables are approximated very reasonably! At least all the rows, columns, headers, and individual cells are all correctly copied and placed in their correct positions; obviously, the formatting is different, because, again, Markdown is not really about design but rather content...
  • Quotations/Citations are not automatically converted to Markdown's own quotation format, but, alas, it's a small price to pay...

Sometimes, when copying certain things from web pages to Joplin, things may appear correct on the Rich Text Editor, but they're not correctly converted to Markdown.

However, this is not the case with rich text copied from Word:

This is almost perfect Markdown โ€” well, except for the lists, they don't seem to be 'real' lists but rather paragraphs with bullet points.

Or are they? Let's switch back to the Rich Text Editor:

Everything is still intact! Nothing was lost in the conversion! (Well, almost)

Notes:

  1. Notice the nice touch that even shows an appropriate alt attribute for the image!
  2. Lists look good enough, but they're not 'real' Markdown lists; however, this should be easy to fix with a very simple search and replace โ€” switching the bullet points for asterisks or hyphens should do the trick, I'm sure.

That's the result of my experiments. Note that I've deliberately used a 'Research Paper' as template since you mentioned using Word for taking notes in an academic environment :wink:

I've done a few more tests:

  1. Copying and pasting to other JavaScript/Web-based text editors, just to see if it works. The results were clearly not conclusive. Some just get unformatted text โ€” Joplin's own Rich Text Editor is not too bad in that regard. Even Word for the web has trouble with bullet-point lists!
  2. I've also tried to copy some text from Word for the web to Joplin. The results were unconvincing โ€” at first, it looks exactly like the Word document (as the HTML is correctly pasted), but, once switching to Markdown and back to rich text again, it reverts to pretty much the same format (if not even less) that the native Word app generates.
2 Likes

Thanks for this reply! Really! I used the solution to this post, and it works nicely!

If you have a lot of Word documents, you can use pandoc for batch converting to Markdown (or whatever)