日期:2014-05-18 浏览次数:20774 次
<select id="ggTempletsType" class="common" name="ggTempletsType">
<option value="MAIL">邮件模版</option>
<option value="SMS">短信息模版</option>
</select>
<div class="right" style="float:left ;height:100%;border: 1px solid #cccccc;">
<fck:editor id="content" basePath="/common/fckeditor/"
height="500"
width="750"
skinPath="/common/fckeditor/editor/skins/silver/"
toolbarSet="MailTemplate"
</fck:editor>
</div>
<!--js-->
<script type="text/javascript">
$("#ggTempletsType").click(function() {
var oEditor = FCKeditorAPI.GetInstance("content");
if($("#ggTempletsType option:selected").val() == "MAIL"){
oEditor.ToolbarSet = "MailTemplate";
//我设置了toolbarset选项,但是不自动该如何使页面正常切换编辑器
//oEditor.ReplaceTextarea() ;
//oEditor.Create();
}else{
oEditor.ToolbarSet = "SMSTemplate";
//oEditor.ReplaceTextarea() ;
}
});
</script>