最新百度编辑器ueditor1.4.3.3php版简单应用

    最新版的使用很简单 根据说明文档修改设置就OK  
<body> <pre>
            编辑器一般步骤  引入  
            个性设置   参考ueditor.config.js里面的配置项  
                       把需要的配置的选项及值 拿出来
                       写一个对象  把该对象当作参数给  
            系统整合   主要就是上传路径的修改  只需把路径改成你想要的存放的路径即可
           </pre>
    <form action="02.php" method="post">  
    <!-- 加载编辑器的容器 -->
        <!-- 详细描述 -->
        <table width="90%" >
          <tr>
            <td><textarea id="goods" name="goods"></textarea></td>
          </tr>
        </table>
    <input type="submit" value="提交">
    <button onclick="getContent()">ajax提交</button>

    </form>     
    </script>
    <!-- 配置文件-->
    <script type="text/javascript" src="./1011/ueditor/ueditor.config.js"></script> 
    <!-- 编辑器源码文件-->
    <script type="text/javascript" src="./1011/ueditor/ueditor.all.js"></script> 

    <!-- 实例化编辑器 -->
    <script type="text/javascript">

    var ue = UE.getEditor('goods_desc',{ 
        toolbars: [
        ['fullscreen', 'source', 'undo', 'redo', 'bold', 'italic', 'underline', 'fontborder', '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', '|',]
            
    ],initialFrameWidth:750,initialContent:'欢迎留言!',
    });

 function getContent() {
        var arr = [];
        arr.push("使用editor.getContent()方法可以获得编辑器的内容");
        arr.push("内容为:");
        arr.push(UE.getEditor('goods_desc').getContent());
        alert(arr.join("\n"));
    }
  function getPlainTxt() {

  }  
</script>

博客:http://www.zongscan.com

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值