Copy pasting nested lists from Word into a post

I know that markdown, html, bbcode, etc. is accepted. I just wanted to copy paste a document from google docs or microsoft word into a post in Discourse without losing the formatting. Is there a way to do this or a plugin?

1 Like

Did you try it?

Copying and pasting into the composer from a office suite software works out of the box.

6 Likes

Yes I tried it. Here is a sample Google docs that has a basic list of items: https://docs.google.com/document/d/1tagjz1vf539NFBPeGOeDcuzbvVVt2Vw50tQOBN4bNyo/edit?usp=drivesdk

I copy pasted this and lost all my formatting. I tried exporting to html and then copy pasted and same thing.

Can you make that document public? I’d like to try it.

I just did a quick test myself of google docs and can confirm that links and bold etc did not transfer over as I would have expected, though bullet points did.

The link is public now. Keeping the hierarchical structure with spacing is what I’m most concerned of. Bold I can do myself.

I. Item 1
A. Item 2
1. Item 3

1 Like

Sure, I am able to replicate the issue you are describing. I am not sure why the bold and links are not copy/pasting properly as they usually do - but do know that hierarchical lists are handled differently enough in markdown that you will be better off just writing them directly in markdown. You will not be able to do mixed styling eg I for level 1, A for level 2, 1 for level 3. Levels are created using spacing, e.g.

To get this:

  1. item one
    1. item 2
      1. item 3

use this markdown:

1. item one
   1. item 2
      1. item 3 

A nicer way to create nicely organized content is using headings - that way you can also use DiscoTOC to display a lovely table of contents.

To get this:

1. item one

A. item 2

1. item 3

use this markdown:

# 1. item one
 
##  A. item 2

### 1. item 3 
1 Like

I see. Thank you. I do have DiscoTOC. I would like a mixture of both that you showed. The markdown showed the tabs beneath each lower level and the DiscoTOC decreased the font size gradually.

I tried using this: https://word2md.com/

It didn’t work but at least it’s a start I can use to further modify.

To create nested lists using markdown, I believe we need 4 spaces or a tab. Tab doesn’t seem to work while in the composer. I was able to do what I wanted with markdown. I just wanted to know if the tab button not working is something intentional and why it doesn’t work.

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