手机
当前位置:查字典教程网 >编程开发 >网页编辑器 >UEditor编辑文章出现多余空行问题的解决办法
UEditor编辑文章出现多余空行问题的解决办法
摘要:新写的网站用UEditor做编辑器,结果发现每次编辑完都会多出首尾空行,像这样:复制代码代码如下:xxxxxx然后看了下自己植入编辑器时的写...

新写的网站用UEditor做编辑器,结果发现每次编辑完都会多出首尾空行,像这样:

复制代码 代码如下:

<p></p>

<br/>

xxxxxx

<br/>

<p></p>

然后看了下自己植入编辑器时的写法,发现了问题所在。

复制代码 代码如下:

<script id="container" name="content" type="text/plain">

<?=$info['content']?>

</script>

<script type="text/javascript">

var editor = UE.getEditor('container', {

initialFrameWidth:"100%",

initialFrameHeight:450

})

</script>

在container中,<?=$info['content']>的前后各有一次回车,而ueditor将这2个回车自动转换为<p></p></br>的形式了。解决方法很简单,写在一行就可以了。

复制代码 代码如下:

<script id="container" name="content" type="text/plain"><?=$info['content']?></script>

<script type="text/javascript">

var editor = UE.getEditor('container', {

initialFrameWidth:"100%",

initialFrameHeight:450

})

</script>

【UEditor编辑文章出现多余空行问题的解决办法】相关文章:

FCKeditor 编辑器插入代码功能实现步骤

UEditor编辑器自定义上传图片或文件路径的修改方法

eWebEditor 请选择一个有效的文件的解决方法

百度编辑器ueditor前台代码高亮无法自动换行解决方法

xhEditor编辑器入门基础

CuteEditor 编辑器的字体样式无法控制的解决方法

浏览器执行history.go(-1) FCKeditor编辑框内显示html源代码的解决方法

Ewebeditor 不能粘贴或复制的解决方法

php下FCKeditor2.6.5网页编辑器的使用方法

Ewebeditor及fckeditork单引号问题的解决方法

精品推荐
分类导航