欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ueditor 1.2.6 使用方法說(shuō)明

 更新時(shí)間:2013年07月24日 09:00:41   作者:  
以下文本是以php版本為例的,對(duì)ueditor 1.2.6的使用方法進(jìn)行了詳細(xì)的說(shuō)明介紹,需要的朋友可以過(guò)來(lái)參考下

本文以php版本為例:
文件下載:http://ueditor.baidu.com/website/download.html
還可以自己先定義內(nèi)容,然后下載,這樣可以幫助我們精簡(jiǎn)不少東西。
以本地php環(huán)境為例,現(xiàn)在www目錄下建立一個(gè)app目錄作為測(cè)試目錄,然后將下載的ueditor文件夾解壓到app文件夾下。


然后,在app文件夾下建立一個(gè)index.php文件。
然后輸入以下代碼:

復(fù)制代碼 代碼如下:

<!DOCTYPE html>
<html>
<head>
<title>編輯器完整版實(shí)例</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <script type="text/javascript" src="./ueditor/ueditor.config.js"></script>
 <script type="text/javascript" src="./ueditor/ueditor.all.js"></script>
 <link rel="stylesheet" href="./ueditor/themes/default/css/ueditor.css"/>
</head>
<body>
    <h2>UEditor提交示例</h2>
    <form id="form" method="post" target="_blank">
        <script type="text/plain" id="myEditor" name="myEditor">
            <p>歡迎使用UEditor!</p>
        </script>
        <input type="submit" value="通過(guò)input的submit提交">
    </form>
   <p>
       從1.2.6開(kāi)始,會(huì)自動(dòng)同步數(shù)據(jù)無(wú)需再手動(dòng)調(diào)用sync方法
       <button onclick="document.getElementById('form').submit()">通過(guò)js調(diào)用submit提交</button>
   </p>
    <script type="text/javascript">
        var editor_a = UE.getEditor('myEditor',{initialFrameHeight:500});
        //--自動(dòng)切換提交地址----
        var doc=document,
            version=editor_a.options.imageUrl||"php",
            form=doc.getElementById("form");
            form.action="./getContent.php";
    </script>
</body>
</html>

然后再瀏覽器輸入localhost/app/
就可以查看編輯器了;
然后會(huì)發(fā)現(xiàn)圖片上傳功能無(wú)法使用,需要打開(kāi)ueditor.config.js
然后找到這一行代碼:
復(fù)制代碼 代碼如下:

var URL = window.UEDITOR_HOME_URL || (function(){

然后再這一行代碼的上面加上這行代碼:
復(fù)制代碼 代碼如下:

window.UEDITOR_HOME_URL||"/app/ueditor/";


然后,刷新一下頁(yè)面,圖片上傳功能就可以使用了。
ueditor的官方說(shuō)明文檔地址:http://ueditor.baidu.com/website/document.html
官方說(shuō)明文檔中的文件名有錯(cuò)誤(應(yīng)該是版本升級(jí)之后沒(méi)有修改過(guò)來(lái)),請(qǐng)大家注意。

相關(guān)文章

最新評(píng)論