为什么我的TinyMCE隐藏textarea起作用? [英] Why is my TinyMCE hidden textarea acting up?
问题描述
我在网页上有大约7个 textarea
,所有这些都是使用TinyMCE的富文本编辑器。但是在页面加载中,只有1个可见,其余的隐藏。用户可以点击显示链接,逐个显示剩余的文本区域。
I have about 7 textarea
s on a web page, all of them are rich text editors using TinyMCE. However at page load only 1 of them is visible and the rest of them hidden. The user can click a 'show' link which would display the remaining textareas one by one.
然而,我有一个奇怪的问题。所有 textarea
的设置如下:
However, I have a weird problem. All the textarea
s are setup like this:
<textarea cols="40" rows="20"></textarea>
但是,只显示页面上的 textarea
负载是我想要的完整尺寸。剩下的 textarea
在显示它们时真的很小。所以我认为也许他们没有被渲染,因为它们被隐藏在页面加载上。
However, only the textarea
displayed on page load is the full size I want it to be. The remaining textarea
s are really small when I show them. So I'm thinking that perhaps they aren't rendered because they are hidden on page load.
我该如何补救?
推荐答案
尝试将一些CSS添加到隐藏的textareas中。
Try adding some CSS to textareas that are hidden.
例如,使用
<textarea cols="40" rows="20" style="width: 40em; height: 20em"></textarea>
我想我遇到了这个,TinyMCE的CSS覆盖了一些默认的CSS行为。我最终不得不重新覆盖它,并最终编辑了TinyMCE的CSS页面。
I think I ran into this, where TinyMCE's CSS overrides some of the default CSS behaviour. I ended up having to "re-override" it, and eventually edited the TinyMCE's css pages.
这篇关于为什么我的TinyMCE隐藏textarea起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!