zoukankan      html  css  js  c++  java
  • 百度编辑器Ueditor自动换行,添加<p>的问题

      百度编辑器Ueditor其实蛮好用的,后来使用了一段时间发现,每次打开后又保存,发现都会往内容的前后都增加一个空白的<p></p>。刚开始以后是百度编辑器的问题,找了很长时间也没办法解决。后来经过排查,发现居然是自己代码的问题。

      如果代码是这样写的:

      <script id="editor" type="text/plain" name="Content" style="auto;height:400px;">
          "你的Content"
      </script>

      哈哈,缩进挺漂亮的嘛。但是前后有了回车啊,回车,回车,回车。百度编辑器会自动把回车转换成<p></p>

      正确的写法是,代码不能够有换行。

    <script id="editor" type="text/plain" name="Content" style="auto;height:400px;">"你的Content"</script>

      这样写,Ueditor就不会自动往内容里面添加<p></p>标签了。坑。

  • 相关阅读:
    Android 联系人中使用的常量
    Android 获取联系人Uri
    Android 编辑联系人
    Android 删除联系人
    Android 联系人添加
    Android 联系人查询
    CollectionViewMasonryLayout
    centos7搭建redis
    centos7搭建zookeeper
    排序算法
  • 原文地址:https://www.cnblogs.com/kissdodog/p/5419919.html
Copyright © 2011-2022 走看看