<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                wangEditor支持使用`sea.js`進行模塊定義,通過一個demo演示一下。 ----- demo的源碼結構是這樣的: ![](https://box.kancloud.cn/2016-02-24_56cdbb8ed4651.png) 首先,在`js`文件夾中引用`jquery`,**特別注意——jquery默認是不支持CMD的,必須對源碼做出調整。調整內容功能如下:** ```js //調整前: if ( typeof define === "function" && define.amd ) { define( "jquery", [], function() { return jQuery; }); } //調整后: if ( typeof define === "function") { define( "jquery", [], function() { return jQuery; }); } ``` 因此,調整后的名字修改為`jquery-2.2.1-for-seajs.js`。然后在`js`文件夾中引用`sea.js` 然后,創建一個`main.js`,將作為啟動項在html頁面中引用。代碼如下: ```js define(function(require, exports, module){ var $ = require('jquery'); require('wangEditor')($); $(function(){ // 用來創建編輯器 var editor = new wangEditor('div1'); editor.create(); }); }); ``` 最后,創建一個html文件,**html文件和`main.js`最好在同一個目錄下**。其中引用`seajs`: ```html <div id="div1"> <p>請輸入內容...</p> </div> <!--引用seajs--> <script type="text/javascript" src="sea.js"></script> <script type="text/javascript"> // seajs 的簡單配置 seajs.config({ alias: { // 相對于 main.js 的路徑 'jquery': './js/jquery-2.2.1-for-seajs', 'wangEditor': '../../dist/js/wangEditor.min' } }); // 加載入口模塊,即剛剛創建的 main.js seajs.use("main"); </script> ``` 搞定! --- PS:demo源碼請參見 https://github.com/wangfupeng1988/wangEditor/tree/master/test/seajs ---- **注意,使用一個瀏覽器同時瀏覽requirejs和seajs的demo,可能出現混亂。這兩種情況本來就不可共存,瀏覽demo時也請使用不同瀏覽器查看效果。**
                  <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>

                              哎呀哎呀视频在线观看