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的后来有问题就直接下载官网的然后拷贝进了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’;
进入控制器遍先初始化了这个函数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文件,看官网说这里url是写ueditor的路径,我怎么写都不对,求大神赐教。
这是出来的部分页面:不过什么样式都没有,我试了一下把页面放在ueditor的文件夹里写是可以出来编辑器的,不过那个里吗的url什么的都没改。
下面这个是报错信息
希望有做这块经验的大神帮我看看,感谢感谢。
问题解答
回答1:试试把整个UEditor目录放在你的根目录下
相关文章:
1. python相关问题求解决,有偿2. Python异常退出时保存进度?3. python - 用__call__ 实现装饰器功能4. html5 - H5移动端UC浏览器的,跳转下一个页面,下一个页面input输入框获取焦点后,会带出上一页的内容?5. javascript - 把字符串日期转换成一般时间格式后,发现小于10的数字不会自动添加0在前面,如下6. javascript - prismplayer播放器全屏问题7. javascript - js判断一个数组是否重复8. javascript - 在sublime中如何给.vue文件注释?9. javascript - input输入框触发change事件后,外部元素会被选中10. javascript - 这种上传图片预览怎么做?