# Help us to test the HTML pasting

**URL:** https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661
**Category:** Feature
**Tags:** feedback
**Created:** [2017年十二月22日 07:45 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661 "2017-12-22T07:45:38Z")
**Posts on this page:** 18
**Page:** 2

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年一月31日 17:11 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/24 "2018-01-31T17:11:56Z")

</div>

Previously HTML pasting will fallback to plain text pasting if it contained complex tables. Now all other elements inside those tables will be converted to Markdown. And table columns will be replaced with spaces and rows are separated by new lines.

@tobiaseigen can you please test this with the email newsletters you [mentioned](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/10). It should work now by skipping the table structure.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2018年一月31日 17:16 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/25 "2018-01-31T17:16:31Z")

</div>

lookin’ good! 🚀 nice job, vinoth, and many thanks. you have revolutionized how our community can create formatted topics wioh this feature.

An email that looked like this:

 ![54%20AM](https://global.discourse-cdn.com/meta/original/3X/6/b/6b04c858aa3183cba4e3b2352b0275e161d8e487.jpg)

copy/pasted into discourse now looks like this:

> ![360x98](https://global.discourse-cdn.com/meta/original/3X/7/5/7537bc79c802020cc0a9160df0a04425662a676a.png)
> 
> ![](https://global.discourse-cdn.com/meta/original/3X/1/0/10d7d37d0ecceb661743a6aafe5e31178c489b9d.jpg)
> 
> ![5x1](https://global.discourse-cdn.com/meta/original/3X/f/d/fdf9203ddc9f1f487c011a690e8cde0fd754cc99.gif)
> 
> Please note that TrustAfrica offices will be closed from Friday, the 22nd of December to Monday, the 8th of January 2018.

it’s like magic! ✨

---

<div class="post-metadata">

### Author: ![Ryan\_Nix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_nix/32/78712_2.png) [@Ryan\_Nix](https://meta.discourse.org/u/Ryan_Nix)
#### Post date: [2018年一月31日 19:06 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/26 "2018-01-31T19:06:09Z")

</div>

Works great and has saved me a lot of time. Thank you!

Would it be possible to actually import the images from the paste? I noticed the images are still referencing the site from which it was taken. In our case, it’s not copyrighted material, just copying and pasting from Apple’s now-defunct Wiki/Blog system.

- Ryan

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [2018年一月31日 19:30 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/27 "2018-01-31T19:30:29Z")

</div>

That’s a good question - does it copy attachments to local as usual based on the admin setting? I have not checked this myself.

---

<div class="post-metadata">

### Author: ![Ryan\_Nix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_nix/32/78712_2.png) [@Ryan\_Nix](https://meta.discourse.org/u/Ryan_Nix)
#### Post date: [2018年一月31日 19:41 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/28 "2018-01-31T19:41:42Z")

</div>

In the posting, it looks like it’s still referring to the original source.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年一月31日 19:50 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/29 "2018-01-31T19:50:24Z")

</div>

Sure. If you enabled `download remote images to local` site setting then the pasted external images will be downloaded locally.

@Ryan_Nix It will take some time _(by default 5 mins as per `editing grace period` site setting)_ before it downloaded to local.

---

<div class="post-metadata">

### Author: ![Ryan\_Nix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_nix/32/78712_2.png) [@Ryan\_Nix](https://meta.discourse.org/u/Ryan_Nix)
#### Post date: [2018年一月31日 20:08 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/30 "2018-01-31T20:08:28Z")

</div>

Terrific. That option was already checked. So perhaps the images are already there, then? I suppose I should have browsed the storage system to check first before commenting. 🤔

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年二月9日 21:02 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/31 "2018-02-09T21:02:00Z")

</div>

MS Word `ul` tag support (with nested) is now available. It is tested on Word 2007. I look forward to receive the reviews for other versions of Word.

Next I will try to improve the `ol` tag support for Word. Currently it is treated same like `ul` tags.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2018年二月24日 17:35 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/32 "2018-02-24T17:35:35Z")

</div>

Copying markdown from discourse’s `/raw` routes results in some weird behaviour.

For example, copying the content from [here](https://meta.discourse.org/raw/60549/1) gives me this:

 ![46](https://global.discourse-cdn.com/meta/original/3X/c/4/c4a17a16072a699a32fb4d4781eb9e79e98542ce.png)

This is chrome stable on macOS.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [2018年二月28日 12:11 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/33 "2018-02-28T12:11:36Z")

</div>

Second-level numbered points in Word are moved into first level. For example,

Word:

```plaintext
1. blah blah blah
      1. blah blah blah
      2. blah blah blah

```

Markdown:

```plaintext
1. blah blah blah

2. blah blah blah 

3. blah blah blah

```

Works fine for multi-level bullet points.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2018年二月28日 23:22 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/35 "2018-02-28T23:22:43Z")

</div>

How many weird edge cases are we getting into here @vinothkannans? I would hate to have every client in the world download a thousand lines of JavaScript that do nothing but deal with MS Word oddities in pasting. Can this be server side only, so the cost is only paid when we encounter MS Word docs? I don’t want client code size to bloat too much based on dozens of bizarre edge cases.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年三月1日 03:18 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/36 "2018-03-01T03:18:59Z")

</div>

@schungx as I mentioned `ol` tag support for Word is limited. In your case it is the output of plain text pasting _(fallback)_ only. Not html pasting.

@codinghorror the weird edge cases from MS Word are `ul` and `ol` tags only. To fix `ul` tag issues it took 26~ extra lines. Yes both `ol` tag support for MS Word and style attributes support for Google docs will cost more lines. But accessing server side for this may cost similar lines. If possible then I will try to load those lines only if html pasting enabled.

@david thank you. I will check it 👍

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2018年三月1日 05:43 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/37 "2018-03-01T05:43:05Z")

</div>

> [@vinothkannans](#):
>
> If possible then I will try to load those lines only if html pasting enabled.

Works for me, as long as we’re not bloating code for a condition 1% of people will ever hit.

---

<div class="post-metadata">

### Author: ![alehandrof](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alehandrof/32/119526_2.png) [@alehandrof](https://meta.discourse.org/u/alehandrof)
#### Post date: [2018年七月13日 10:01 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/38 "2018-07-13T10:01:35Z")

</div>

Whatever happened to this:

> [@Help us to test the HTML pasting](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/6):
>
> I agree lists should be tight by default @vinothkannans.

AFAICT, lists pasted from Google Docs are still spaced out. Is this intentional?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年七月13日 11:01 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/39 "2018-07-13T11:01:27Z")

</div>

While copying from other webpages it is already using tightened list as default. But I am able to reproduce this issue in Google docs and LibreOffice Writer. Thanks for the report. I will fix it.

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年八月30日 20:43 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/40 "2018-08-30T20:43:42Z")

</div>

> [@alehandrof](#):
>
> AFAICT, lists pasted from Google Docs are still spaced out.

It’s fixed. You can check it now.

---

<div class="post-metadata">

### Author: ![alehandrof](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alehandrof/32/119526_2.png) [@alehandrof](https://meta.discourse.org/u/alehandrof)
#### Post date: [2018年八月31日 08:24 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/41 "2018-08-31T08:24:56Z")

</div>

Yes, it works great now, thank you! 🙏

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2018年九月17日 11:21 UTC](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661/42 "2018-09-17T11:21:38Z")

</div>



[上一頁](https://meta.discourse.org/t/help-us-to-test-the-html-pasting/77661.md?page=1)
