问题
Example:
<p style="color:blue; font-family:Consolas">blue text</p>
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
From browser to word
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?
回答1:
This is a native OS/software feature. This is not something you can control via js/html.
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.
回答2:
This is default in all the windows operating systems. when ever you select the text the blue color will occur in select area. manually we never change the color. i think this answer very usefull to you.....
来源:https://stackoverflow.com/questions/11802083/there-is-some-way-to-ignore-the-css-style-on-copy