如何在 TinyMCE 编辑器中设置用户选择/突出显示的文本的背景?我不想要蓝色背景和白色前景的默认选择样式。我怎样才能改变它?这些是我content.css
对 TinyMCE 主题文件的绝望尝试,但它们并没有带来任何改变!
.mceContentBody::-moz-selection { background: transparent !important; }
.mceContentBody::selection { background: transparent !important; }
.mceContentBody::-webkit-selection { background: transparent !important; }
#tinymce::-moz-selection { background: transparent !important; }
#tinymce::selection { background: transparent !important; }
#tinymce::-webkit-selection { background: transparent !important; }
:-moz-selection { background: transparent !important; }
::selection { background: transparent !important; }
::-webkit-selection { background: transparent !important; }
p:-moz-selection { background: transparent !important; }
p::selection { background: transparent !important; }
p::-webkit-selection { background: transparent !important; }
span:-moz-selection { background: transparent !important; }
span::selection { background: transparent !important; }
span::-webkit-selection { background: transparent !important; }
请帮忙!
相关 TinyMCE 元素的 HTML 代码为:
<iframe>
<html>
<head>...</head>
<body id='tinymce' class='mceContentBody'>...
<p> <span> Here is the text that should have a transparent background when highlighted by the user </span> </p>
</body>
</html>
</iframe>