javascript - 使用百度文本編輯器ueditor不顯示樣式問題
問題描述
我用的angular寫的,希望前端大神幫我看看。附上代碼html:
<p class='form-group'><label class='col-sm-2 control-label'>新編輯器</label><p class='col-sm-10'><p class='row'> <p class='col-md-12 col-lg-10'><p id='myEditor'></p> </p></p> </p></p>
js:我的ueditor是在node_modules里,本來是npm install ueditor --save的后來有問題就直接下載官網(wǎng)的然后拷貝進(jìn)了node_modules/ueditor里面。import ’../../../../../../node_modules/ueditor/ueditor.config.js’;import ’../../../../../../node_modules/ueditor/ueditor.all.js’;import ’../../../../../../node_modules/ueditor/lang/zh-cn/zh-cn.js’;
進(jìn)入控制器遍先初始化了這個(gè)函數(shù)this.initUeditor();
initUeditor(){ this._Timeout(() => {var ue = new baidu.editor.ui.Editor(); ue.render('myEditor');//var ue = UE.getEditor(’container’);console.log(ue); }, 300);}
表示不會(huì)配config文件,看官網(wǎng)說這里url是寫ueditor的路徑,我怎么寫都不對(duì),求大神賜教。
這是出來的部分頁面:不過什么樣式都沒有,我試了一下把頁面放在ueditor的文件夾里寫是可以出來編輯器的,不過那個(gè)里嗎的url什么的都沒改。
下面這個(gè)是報(bào)錯(cuò)信息
希望有做這塊經(jīng)驗(yàn)的大神幫我看看,感謝感謝。
問題解答
回答1:試試把整個(gè)UEditor目錄放在你的根目錄下
相關(guān)文章:
1. javascript - node.js promise沒用2. android 如何實(shí)現(xiàn)如圖中的鍵盤上的公式及edittext的內(nèi)容展示呢3. c++ - 如何正確的使用QWebEngineView?4. yii2中restful配置好后在nginx下報(bào)404錯(cuò)誤5. javascript - js 寫一個(gè)正則 提取文本中的數(shù)據(jù)6. 算法 - python 給定一個(gè)正整數(shù)a和一個(gè)包含任意個(gè)正整數(shù)的 列表 b,求所有<=a 的加法組合7. golang - 用IDE看docker源碼時(shí)的小問題8. ruby - gitlab托管,git clone 失敗?9. java - 我在用Struts2上傳文件時(shí),報(bào)以下錯(cuò)誤怎么回事?10. 網(wǎng)站被黑,請(qǐng)教下大神,怎么對(duì)datebase.php內(nèi)容加密。
