将插件集成到Froala编辑器中

时间:2019-09-26 12:13:12

标签: angular froala

我正在使用angular-froala-wysiwyg v3软件包,并且想插入编辑器jquery.atwho插件中。

options: any = {
    events: {
        "initialized": (froalaEditor) => {
            console.log(froalaEditor);
            console.log(froalaEditor._editor);
            console.log(froalaEditor._editor.$el);
            console.log(froalaEditor._editor.el);
            console.log(froalaEditor._element);
            (<any>$(froalaEditor._element)).atwho();
        }
    }
};

在html中:

<div [froalaEditor]="options"></div>

但是有错误jquery__WEBPACK_IMPORTED_MODULE_3__(...).atwho is not a function

在更新到angular-froala-wysiwyg v3之前,我有适用于v2的工作代码:

options: any = {
    events: {
        "froalaEditor.initialized": (e, froalaEditor) => {
            froalaEditor.$el.atwho();
        }
    }
};

该如何解决我的问题?

1 个答案:

答案 0 :(得分:0)

如果愿意,请尝试用froala代替-https://www.npmjs.com/package/ngx-editor