有一些方法可以忽略复制时的CSS样式吗?

问题描述:

示例:

<p style="color:blue; font-family:Consolas">blue text</p>

用户选择文本,然后复制并粘贴(所见即所得,单词等).文本没有蓝色和consolas字体?

The user select the text, copy and paste (wysiwyg, word, etc). And the text comes without blue color and consolas font?

从浏览器到浏览器=简单内容到所见即所得

From browser to browser = simple content to wysiwyg

从浏览器到文字

有一本手册,其中包含可用于内容的关键字.用户通常直接从手册中复制关键字并粘贴到编辑器中.因此,编辑器采用了手册的样式.那就是我所不想要的.我可以禁用选择或更改关键字标签以输入和设置其样式,但是存在一种简单的方法吗?

There's a manual with keywords that can be used on content. The users usually copy the keywords directly from manual and paste in the editor. So the editor assumes the style of the manual. And that's what I don't want. I can disable the select or change the tags of keywords to input and style it, but exists a easy way?

这是本机OS/软件功能.您无法通过js/html来控制它.

This is a native OS/software feature. This is not something you can control via js/html.

不过,您可以通过javascript构建将文本复制到剪贴板的功能.

You can however build a function via javascript that copies that text to clipboard.

或在选项中搜索本机功能以将其关闭.

Or search for the native feature in your options to turn it off.