github / github/paste-markdown
Copied table from Excel is pasted as raw HTML
- Ngôn ngữ chính
- JavaScript
- Star
- 234
- Fork
- 47
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
### To Reproduce
Steps to reproduce the behavior:
1. Copy table from [example_table.xlsx](https://github.com/github/issues/files/11222266/example_table.xlsx)
2. Open Google Chrome and navigated to Web UI on GHES 3.8 instance (This issue is reproduced in GitHub.com as well)
3. Paste it on a issue comment. It is pasted as raw HTML.
```
<!--table
{mso-displayed-decimal-separator:"\.";
mso-displayed-thousand-separator:"\,";}
@page
{margin:.75in .7in .75in .7in;
mso-header-margin:.3in;
mso-footer-margin:.3in;}
.font5
{color:windowtext;
font-size:6.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:游ゴシック;
mso-generic-font-family:auto;
mso-font-charset:128;}
tr
{mso-height-source:auto;
mso-ruby-visibility:none;}
col
{mso-width-source:auto;
mso-ruby-visibility:none;}
br
{mso-data-placement:same-cell;}
td
{padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:black;
font-size:12.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:游ゴシック;
mso-generic-font-family:auto;
mso-font-charset:128;
mso-number-format:General;
text-align:general;
vertical-align:middle;
border:none;
mso-background-source:auto;
mso-pattern:auto;
mso-protection:locked visible;
white-space:nowrap;
mso-rotate:0;}
ruby
{ruby-align:left;}
rt
{color:windowtext;
font-size:6.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:游ゴシック;
mso-generic-font-family:auto;
mso-font-charset:128;
mso-char-type:katakana;
display:none;}
-->
a | b
-- | --
1 | 2
```
**Expected behavior**
When I pasted the same excel table in Safari, it was formatted as Markdown style.
```
a | b
-- | --
1 | 2
```
**Screenshots**
Copy and paste table from Excel results in both raw HTML and Markdown. It depends on browser
Raw HTML in Chrome

Markdown in Safari
Hướng dẫn đóng góp
Hướng nghiên cứu
Start by reproducing the Excel-table paste in Chrome and Safari on the web UI, using the attached example_table.xlsx and the provided steps. Trace the browser clipboard and paste handling implicated by the issue. Done means Chrome produces the same Markdown-style table as Safari instead of exposing the raw Excel HTML.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100