Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

所见即所得复制粘贴问题 #253

Closed
ghost opened this issue Mar 30, 2020 · 2 comments
Closed

所见即所得复制粘贴问题 #253

ghost opened this issue Mar 30, 2020 · 2 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Mar 30, 2020

请先看《提问的智慧》,并尝试到黑客派搜寻资料解决问题。


编辑模式

请选择你遇到问题时使用的编辑模式:所见即所得模式

描述问题

在黑客牌或者其他地方,复制文章内容,会把html标签也粘贴上去,而且不容易发现

期待的结果

流畅的复制粘贴,自动识别这些样式或者便签,并格式化粘贴
或者提供无格式粘贴

截屏或录像

image

如图所示

其他信息

不完美的解决方案,将内容贴到qq或者微信输入框里面,再从其他地方复制粘贴过来


<pre><div class="vditor-copy"><textarea></textarea><span aria-label="复制" onmouseover="this.setAttribute('aria-label', '复制')" class="vditor-tooltipped vditor-tooltipped__w" onclick="this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '已复制')"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32px" height="32px"> <path d="M28.681 11.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-11.5c-1.379 0-2.5 1.121-2.5 2.5v23c0 1.378 1.121 2.5 2.5 2.5h19c1.378 0 2.5-1.122 2.5-2.5v-15.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 9.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268v0zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-19c-0.271 0-0.5-0.229-0.5-0.5v-23c0-0.271 0.229-0.5 0.5-0.5 0 0 11.499-0 11.5 0v7c0 0.552 0.448 1 1 1h7v15.5zM18.841 1.319c-1.612-1.182-2.393-1.319-2.841-1.319h-11.5c-1.378 0-2.5 1.121-2.5 2.5v23c0 1.207 0.86 2.217 2 2.45v-25.45c0-0.271 0.229-0.5 0.5-0.5h15.215c-0.301-0.248-0.595-0.477-0.873-0.681z"></path> </svg></span></div><code class="highlight-chroma">$ go mod init caddy
$ go get github.com/caddyserver/caddy/v2@v2.0.0-beta.15
$ go build
</code></pre>
@Vanessa219
Copy link
Owner

Vanessa219 commented Mar 30, 2020

可以具体描述一下重现步骤么?这里无法重现

@88250
Copy link
Collaborator

88250 commented Apr 2, 2020

或者提供无格式粘贴

这个可以用“粘贴为纯文本”(Windows 上,Mac 上是“粘贴并匹配样式”)。

Vditor 自身的 DOM 结构粘贴解析稍后进行增强改进,感谢反馈。

@Vanessa219 Vanessa219 assigned Vanessa219 and unassigned 88250 Apr 2, 2020
stevapple pushed a commit to stevapple/vditor that referenced this issue Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants