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)的然后拷貝進了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’;
進入控制器遍先初始化了這個函數(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);}
表示不會配config文件,看官網(wǎng)說這里url是寫ueditor的路徑,我怎么寫都不對,求大神賜教。
這是出來的部分頁面:不過什么樣式都沒有,我試了一下把頁面放在ueditor的文件夾里寫是可以出來編輯器的,不過那個里嗎的url什么的都沒改。
下面這個是報錯信息
希望有做這塊經(jīng)驗的大神幫我看看,感謝感謝。
問題解答
回答1:試試把整個UEditor目錄放在你的根目錄下
相關文章:
1. java - public <T> T findOne(T record) 這是什么意思2. css - 關于ul的布局3. javascript - 前端開發(fā) 本地靜態(tài)文件頻繁修改,預覽時的緩存怎么解決?4. android - 優(yōu)酷的安卓及蘋果app還在使用flash技術嗎?5. docker不顯示端口映射呢?6. mysql數(shù)據(jù)庫每次查詢是一條線程嗎?7. python - linux怎么在每天的凌晨2點執(zhí)行一次這個log.py文件8. javascript - 我的站點貌似被別人克隆了, google 搜索特定文章,除了域名不一樣,其他的都一樣,如何解決?9. 如何分別在Windows下用Winform項模板+C#,在MacOSX下用Cocos Application項目模板+Objective-C實現(xiàn)一個制作游戲的空的黑窗口?10. 小程序怎么加外鏈,語句怎么寫!求救新手,開文檔沒發(fā)現(xiàn)
