在tinymce加载期间看到并闪烁的其他内容 [英] other content seen and blinks during tinymce loading
问题描述
我在它下面有 textarea 和按钮.我正在向这个 textarea 添加 tinymce 编辑器.但是,当页面第一次加载时,用户可以看到类似闪烁的东西.他看到按钮,然后才出现所见即所得的编辑器,并按下按钮.
我的 HTML:
<form method="post" id="doc_form" target="somwhere"><textarea name="doc_text"><?php echo $file;?></textarea><input type="hidden" name="submitted" id="submitted" value="1"/></表单><a id="doc_send_email" class="btn">SEND</a><a id="pritn_pdf_btn" class="btn">打印<span class="span_pdf">PDF </span></a>
因此,当用户打开网页时,他可以看到按钮 SEND 和按钮 PRINT 几毫秒.如何处理?
下面的答案很好.另一种选择是创建带有预定义高度的 div 文本.
您可以在按钮上添加 style="display: none;"
,然后在您的 tinymce 配置中执行此操作:
tinymce.init({...设置:功能(编辑器){editor.on('init', function(e) {$("#doc_send_email").css("display", "block");$("#pritn_pdf_btn").css("display", "block");});}});
I am having textarea and buttons under it. I am adding tinymce editor to this textarea. However, when the pages is loaded first time, user can see something like blinking. He sees buttons and only then wysiwyg editor appears and buttons are pushed under it.
My HTML:
<div class="middle">
<form method="post" id="doc_form" target="somwhere">
<textarea name="doc_text"><?php echo $file; ?></textarea>
<input type="hidden" name="submitted" id="submitted" value="1" />
</form>
<a id="doc_send_email" class="btn">SEND</a>
<a id="pritn_pdf_btn" class="btn">Print <span class="span_pdf">PDF </span></a>
</div>
So, when user opens a webpage, he is able to see button SEND and button PRINT for some ms. How to deal with this?
EDIT: The answer below is fine. Another option could be creating div aroud text with predefined height.
You can add style="display: none;"
on you buttons and then do this in your tinymce configuration:
tinymce.init({
...
setup: function(editor) {
editor.on('init', function(e) {
$("#doc_send_email").css("display", "block");
$("#pritn_pdf_btn").css("display", "block");
});
}
});
这篇关于在tinymce加载期间看到并闪烁的其他内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!