62,051
社区成员
发帖
与我相关
我的任务
分享
<%if (Request.QueryString["type"] == "sel")
{%>
<tr>
<td class="left_title_2" style="width: 300px">
编辑器:
</td>
<td align="left" class="xq">
<script type="text/plain" id="Script1" name="contentRemark"><%=sContentRemark %></script>
</td>
</tr>
<%} %>
function LoadEditor() {
var CMD = '<%=CMD %>';
if (CMD == "New" || CMD == "Edit") {
var h = document.getElementById("<%=S_ShortRemark.ClientID%>").clientWidth + 50;
//编辑器 Cai Add 2013
UE.getEditor('<%=txtS_Remark.ClientID%>',{
//这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
toolbars:[
['fullscreen', 'source', '|', 'undo', 'redo', '|',
'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch','autotypeset','blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist','selectall', 'cleardoc', '|',
'rowspacingtop', 'rowspacingbottom','lineheight','|',
'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
'directionalityltr', 'directionalityrtl', 'indent', '|',
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','touppercase','tolowercase','|',
'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright','imagecenter', '|',
'insertimage', 'insertvideo','music','attachment','pagebreak','template', '|',
'horizontal', 'spechars', '|',
'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', '|',
'print', 'preview', 'searchreplace','help']
],
//focus时自动清空初始化时的内容
autoClearinitialContent:false,
//关闭字数统计
wordCount:false,
//关闭elementPath
elementPathEnabled:false,
//更多其他参数,请参考editor_config.js中的配置项
initialFrameWidth: h,
initialFrameHeight: 300,
initialContent: '',
autoFloatEnabled:false,
//纵向滚动条
autoHeightEnabled:false
});
}
}
设一个变量标识,判断一下就可以了。
百度开源免费编辑器(UEditor)使用方法