<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                **第一,下載、并引用 zepto.js 和 zepto.touch.js** `wangEditor-mobile`基于`zepto`開發,因此頁面中要首先引用 `zepto.js` 和 `zepto.touch.js`。可去[zepto中文站](http://www.zeptojs.cn/)下載,或者[點擊這里](https://github.com/wangfupeng1988/wangEditor-mobile/tree/master/dist/js/lib)下載。 下載之后,將兩者引用到頁面內。 ```html <script type="text/javascript" src="../dist/js/lib/zepto.js"></script> <script type="text/javascript" src="../dist/js/lib/zepto.touch.js"></script> ``` (建議引用寫在到<body>底部) ---- **第二,下載、并引用 wangEditor-mobile.js 和 wangEditor-mobile.css** 進入[官網](http://wangeditor.github.io/m/)或者[點擊這里](https://github.com/wangfupeng1988/wangEditor-mobile/releases)下載`wangEditor-mobile`的最新代碼,解壓之后,找到**`dist`文件夾**,文件夾結構如下: ![](https://box.kancloud.cn/2015-12-16_5671787e069bd.png) 將其中的`wangEditor-mobile.js`和`wangEditor-mobile.css`引用到頁面中(也可以引用它們丟應的min壓縮格式的文件) **請注意以下兩點:** 1. 紅框中的 `fonts` 文件夾及其內容,一定要下載下來,并和`wangEditor-mobile.css` 放在同一個目錄,否則菜單圖標將不顯示。 2. `zepto.js` 和 `zepto.touch.js` 一定要引用在 `wangEditor-mobile.js` 的前面。 --- **第三,生成富文本編輯器** 首先,在頁面的`<body>`中添加一個`textarea`標簽, ``` <textarea id="textarea1" style="width:100%;height:100%;"> <p>請輸入內容...</p> </textarea> ``` 然后,可通過該`textarea`生成一個富文本編輯器。**編輯器編輯的內容,也會實時同步到 `textarea` 無需手動同步** ``` <script type="text/javascript"> $(function () { // ___E 三個下劃線 var editor = new ___E('textarea1'); editor.init(); }); </script> ``` 運行頁面,使用手機(或模擬器)瀏覽器即可看到效果。 --- **最后,寫一個完整的例子** ```html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"> <title>wangEditor mobile test</title> <link rel="stylesheet" type="text/css" href="../dist/css/wangEditor-mobile.css"> <style type="text/css"> .container { width:100%; height:300px; border:1px solid #ccc; } </style> </head> <body> <p>wangEditor-mobile test</p> <div class="container"> <textarea id="textarea1" style="width:100%;height:100%;"> <p>請輸入內容...</p> </textarea> </div> <script type="text/javascript" src="../dist/js/lib/zepto.js"></script> <script type="text/javascript" src="../dist/js/lib/zepto.touch.js"></script> <script type="text/javascript" src="../dist/js/wangEditor-mobile.js"></script> <script type="text/javascript"> $(function () { // ___E 三個下劃線 var editor = new ___E('textarea1'); editor.init(); }); </script> </body> </html> ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看