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>