如何在tinyMCE工具栏上设置z-index?
我正在使用tinyMCE编辑器插件。它将 texarea 转换为 iframe,并且工具栏出现在文本内容的顶部。它工作得很好。
有时内容上方会有一些视频。因此,当我单击文本区域时,工具栏会出现,但内容上方的视频播放器会将其隐藏在自身后面。
有什么办法可以改变工具栏的 z-index 吗? (优选) 或者我应该更改工具栏的位置???
这是我的代码:
tinyMCE.init({
mode : "textareas",
editor_selector : "combo123",
theme : "advanced",
plugins : "save, paste, autoresize, asciimath, asciisvg",
theme_advanced_styles: "Foo=foo, Bar=bar",
content_css : "/css/tiny_mce.css"
});
I am using tinyMCE editor plugin. It converts texareas into iframes and a toolbar appears at top of the text content. It is working perfectly.
Sometimes there are some videos above the content. So when I click textarea, the toolbar appears but video player above the content hides it behind itself.
Is there any way to change the z-index of the toolbar ? (Preferable)
Or should I change the location of toolbar ???
Here is my code:
tinyMCE.init({
mode : "textareas",
editor_selector : "combo123",
theme : "advanced",
plugins : "save, paste, autoresize, asciimath, asciisvg",
theme_advanced_styles: "Foo=foo, Bar=bar",
content_css : "/css/tiny_mce.css"
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
增加tinymce的z-index,这样它就不会被另一个div覆盖
Increase the z-index for tinymce so it does not get overridden from another div
您还可以在初始化后使用设置参数设置 z-index
You may also set the z-index right after initialization using the setup param
tinyMCE 正在对文本区域进行转置,因此将文本区域放入容器中并在容器上设置 z-index。
The tinyMCE is transposing over the textarea, so put the textarea into a container and set the z-index on the container.
如果视频播放器是基于 Flash 的,这将无济于事。
此页面声称将“opaque”添加到播放器的“wmdode”参数是一个解决方案,但我还没有测试过:
http://slightlymore.co.uk/flash-and- -z-index-问题已解决/
If the video player is Flash based, this won't help.
This page claims adding "opaque" to the "wmdode" param of the player is a solution, but I haven't tested it:
http://slightlymore.co.uk/flash-and-the-z-index-problem-solved/
注意你添加了两个content_css,它应该只是一个content_css
实际上content_css应该让你的网站.css添加目的,,所以对于textarea你可以在你的css中限制,你可以设置宽度和高度
to your Notice you have added two content_css, it should be only one content_css
actually the content_css should have your site .css adding purpose ,,so for textarea you can restrict in your css and you can set the width and height
我用这个解决了
I solved using this
这适用于角度,将其添加到您的 component.scss
this works in angular, add it to your component.scss
tinymce.ui.FloatPanel.zIndex = 99;
tinymce.ui.FloatPanel.zIndex = 99;