文本编辑器

<%@include file="/WEB-INF/views/include/idCardAndPhoneCheck.jsp" %>
<%@include file="/WEB-INF/views/include/ueditor.jsp"%>

<div class="control-group">
			<label class="control-label" style="margin-left: 14px;">公示内容:</label>&nbsp;&nbsp;
		   	<div class="controls">
				<a class="article_item" href="javascript:viod(0);">                
             			<textarea id="editor"  name="publicContent" style="width:810px;height:300px;">${publicContent}</textarea>  
       	 		</a> 
			<script> var ue = UE.getEditor('editor') </script>
			<script>
    				var ue = UE.getEditor('editor',{
    					toolbars:[[]],
    			        	initialContent: '初始化内容',//初始化编辑器的内容
    			        	initialFrameHeight: 200,
    			        	serverUrl: '/server/ueditor/controller.php',
    			        	//关闭字数统计
    			        	wordCount:false,
    			        	elementPathEnabled :false,
    			        	initialFrameWidth:'100%',
    			        	initialFrameHeight:660,
    			        	scaleEnabled:false,
        				autoHeightEnabled: true,
	   				autoFloatEnabled: true
    				})
			</script>
				<%--<script id="editor" name="publicContent" type="text/plain" style="width:810px;height:300px;">
					${publicContent}
				</script>
				
				<script type="text/javascript">
					 		var ue = UE.getEditor('editor', {
							    autoHeightEnabled: true,
							    autoFloatEnabled: true
							});
				</script>--%>
			</div>
		</div>

编辑器设置限制字数

在配置文件editor.config.js里改下面这两个量:

wordCount:true, //是否开启字数统计
maximumWords:10000, //允许的最大字符数 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

五毒幽泉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值