search

Home  >  Q&A  >  body text

javascript - Using Baidu text editor ueditor does not display the style problem

I wrote it in angular, I hope the front-end master can help me take a look. Attached is the code
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: My ueditor is in node_modules. It was originally npm install ueditor --save. Later, when there was a problem, I downloaded it directly from the official website and copied it into 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';

When entering the controller, first initialize this function this.initUeditor();

initUeditor(){
    this._Timeout(() => {
        var ue = new baidu.editor.ui.Editor();
            ue.render("myEditor");
        //var ue = UE.getEditor('container');
        console.log(ue);
    }, 300);
}

means that the config file will not be configured. The official website says that the url here is the path to write ueditor. No matter how I write it, it is not correct. Please enlighten me.

This is part of the page that came out: But there is no format. I tried putting the page in the ueditor folder and it can come out of the editor, but the URL in it has not changed.

The following is the error message

I hope someone with experience in doing this can help me take a look, thank you.

PHP中文网PHP中文网2743 days ago891

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-24 11:38:47

    试试把整个UEditor目录放在你的根目录下

    reply
    0
  • Cancelreply