I'm not sure whether a Javascript or CSS fix could fix this issue on my site. This seems to only happen with Chrome (not sure about IE, yet).

我不确定Javascript或CSS修复程序是否可以在我的网站上修复此问题。这似乎只发生在Chrome上(还不确定IE)。

Whenever a user copies text from my AspDotNetStorefront site and paste it onto a Word document, the pasted text includes a gray background. Is there anything I can do on my site to prevent this rich text formatting paste feature onto documents?

每当用户从我的AspDotNetStorefront站点复制文本并将其粘贴到Word文档时,粘贴的文本都包含灰色背景。我可以在我的网站上做些什么来阻止这种富文本格式粘贴功能到文档中吗?

I'm not sure what would be the cause of this besides Microsoft Word's default paste setting.

除了Microsoft Word的默认粘贴设置,我不确定这是什么原因。

4 个解决方案

#1


1

.unselectable{
   position:absolute;
   z-index:1;
   color:green;
   -webkit-user-select:none;
}
.selectable{
   position:absolute;
   z-index:2;
   color:rgba(0,0,0,0);
   -webkit-user-select:text;
}
<p class="unselectable">Lorem</p>
<p class="selectable">Lorem</p>

更多相关文章

  1. 在导航图标css下包装文本。
  2. 如何添加文本描述以指向谷歌地图API
  3. 如何在选择单选按钮时显示文本字段
  4. 包含HTML和JavaScript标记的HTML选择控件作为文本
  5. 将输入文本字段显示为纯文本
  6. javascript添加两个文本框值,并在asp.net中显示为第三
  7. 在用户将'n'粘贴复制到文本字段后,如何更新视图模型?
  8. jquery.fullCalendar官方文档翻译(一款小巧好用的日程管理日历,
  9. Javascript警报中文本的颜色

随机推荐

  1. Android软键盘(四)软件盘弹出布局上移的问
  2. Android 新加几个开源项目
  3. 系统重置
  4. Android shape属性
  5. android使Activity背景透明、模糊
  6. Android — get MEID
  7. Android Timer 更好方法
  8. bsh for android : 北京
  9. Could not find com.android.tools.build
  10. Android无法导入下载好的项目(和Eclipse中