使用tinymce压缩器
查看此页面上的代码示例,该示例似乎初始化了两次
http ://wiki.moxiecode.com/index.php/TinyMCE:Compressor/ASPX
初始化示例
下面的示例将把主题和所有插件打包到一个文件/steam 中。 删除您不需要的东西或将自定义插件添加到下面的设置中。 请记住,tinyMCE_GZ.init 调用必须放置在它自己的脚本标记中。
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce_gzip.js"> </script>
<script type="text/javascript">
tinyMCE_GZ.init({
plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
themes : 'simple,advanced',
languages : 'en',
disk_cache : true,
debug : false
});
</script>
<script type="text/javascript">
tinyMCE.init({
.. your normal init ..
});
</script>
您必须调用tinyMCE.init 和tinyMCE_GZ.init 是否正确? 这看起来很奇怪。
我问这个问题是因为当我删除tinyMCE.init时它似乎不起作用,但我想确保我不会违背目的并加载优化版本和非优化版本。tiny
如果是这种情况,应该init 调用是否相同?
reviewing the code example on this page, it seem like the example is initializing both twice
http://wiki.moxiecode.com/index.php/TinyMCE:Compressor/ASPX
Example of initialization
The example below will pack both themes and all plugins into one file/steam. Remove the things you don't need or add you custom plugins to the settings below. Remember that the tinyMCE_GZ.init call must be placed in it's own script tag.
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce_gzip.js"> </script>
<script type="text/javascript">
tinyMCE_GZ.init({
plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
themes : 'simple,advanced',
languages : 'en',
disk_cache : true,
debug : false
});
</script>
<script type="text/javascript">
tinyMCE.init({
.. your normal init ..
});
</script>
is it correct that you have to call tinyMCE.init AND tinyMCE_GZ.init ? this seems odd.
i ask this question because when i remove the tinyMCE.init it doesn't seem to work but i want to ensure i am not defeating the purpose and loading both the optimized version and the non optimized version.tiny
if this is the case, should the init calls be identical?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,你必须这样做,因为tinyMCE.init初始化了tinymeditor,而tinyMCE_GZ.init用于其他用途(gzip)。
Yes, you have to, cause tinyMCE.init initialized the tinymeditor and tinyMCE_GZ.init is used for something else (gzip).