javascript - 使用百度文本編輯器ueditor不顯示樣式問(wèn)題
問(wèn)題描述
我用的angular寫(xiě)的,希望前端大神幫我看看。附上代碼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里,本來(lái)是npm install ueditor --save的后來(lái)有問(wèn)題就直接下載官網(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)說(shuō)這里url是寫(xiě)ueditor的路徑,我怎么寫(xiě)都不對(duì),求大神賜教。
這是出來(lái)的部分頁(yè)面:不過(guò)什么樣式都沒(méi)有,我試了一下把頁(yè)面放在ueditor的文件夾里寫(xiě)是可以出來(lái)編輯器的,不過(guò)那個(gè)里嗎的url什么的都沒(méi)改。
下面這個(gè)是報(bào)錯(cuò)信息
希望有做這塊經(jīng)驗(yàn)的大神幫我看看,感謝感謝。
問(wèn)題解答
回答1:試試把整個(gè)UEditor目錄放在你的根目錄下
相關(guān)文章:
1. docker 17.03 怎么配置 registry mirror ?2. css3里rotate怎么實(shí)現(xiàn)如圖的效果3. javascript - 使用location.href進(jìn)行頁(yè)面跳轉(zhuǎn)時(shí),并不立即跳轉(zhuǎn)?4. mysqld無(wú)法關(guān)閉5. angular.js - angularJS service里面存儲(chǔ)的數(shù)據(jù)能夠直接和HTML頁(yè)面交互嗎?6. html - chrome 下 transiton translateX(10px) 后字體變化7. spring-mvc - eclipse java maven web 項(xiàng)目如何重新編譯 ,不是clean那個(gè) 詳情進(jìn)來(lái)看圖 謝謝大家8. javascript - 七牛接口如何在前端調(diào)用?9. html - css 的::-webkit-scrollbar 只能夠設(shè)置垂直滾動(dòng)條的寬度??如何設(shè)置水平滾動(dòng)條的寬度??10. javascript - vue-cli項(xiàng)目中,獲取微信access_token時(shí)遇到的跨域問(wèn)題
