Skip to content

复制单元格内容到github评论框, 出现<meta charset="utf-8"> 标签, 怎么移除呢,或者有哪个参数可以避免呢 #2214

Closed Answered by lijinke666
Chasen-Zhang asked this question in Q&A
Discussion options

You must be logged in to vote

有 meta 是因为复制出来是 HTML 格式, 这样粘贴其他富文本编辑器中可以显示出表格, 符合预期, 问题是啥? 带来了什么问题?

S2 会在复制的时候往剪贴板写入两种类型的元数据

  • text/html
  • text/plain

粘贴的时候, 取决于接收方选择什么类型的数据, 这里 (GitHub) 富文本接受的 text/html, 对于 Excel 之类的就是 text/plain, 即带制表符 \t 的纯文本

所以不需要移除, 也不存在什么参数避免, 更多背景请查看 https://juejin.cn/post/7160976446498799652


Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@Chasen-Zhang
Comment options

@lijinke666
Comment options

@lijinke666
Comment options

@Chasen-Zhang
Comment options

Answer selected by lijinke666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants