Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CKeditor在Angular2中的实现_Angular_Ckeditor4.x - Fatal编程技术网

CKeditor在Angular2中的实现

CKeditor在Angular2中的实现,angular,ckeditor4.x,Angular,Ckeditor4.x,在我的项目中,我需要用Angular 2实现CKeditor。我还需要添加额外的插件、链接附件、视频、音频等。我需要将自定义插件添加到node_modules/ckeditor或bower_components/ckeditor的plugins文件夹中。如果我使用npm或bower,在执行npm安装或bower安装时,额外插件的自定义设置将被覆盖。那么什么是最好的方法来做这个角度2。请帮忙 谢谢, Dipali您可以将其作为angular2本身中ckeditor的直接实现。如果要使用任何外部库,

在我的项目中,我需要用Angular 2实现CKeditor。我还需要添加额外的插件、链接附件、视频、音频等。我需要将自定义插件添加到node_modules/ckeditor或bower_components/ckeditor的plugins文件夹中。如果我使用npm或bower,在执行npm安装或bower安装时,额外插件的自定义设置将被覆盖。那么什么是最好的方法来做这个角度2。请帮忙

谢谢, Dipali

您可以将其作为angular2本身中ckeditor的直接实现。如果要使用任何外部库,请执行以下步骤:

  • 安装库(使用npm,因为bower很快就会死:p)

    npm安装

  • 为模块添加类型脚本定义

    tsd安装

  • 将脚本包含在index.html或根html文件中

  • 在systemsjs.config.js中添加路径配置,以便 SystemJs将从此路径选择js源
    System.config({
    [...]
    路径:{
    模块变量:'./节点模块//module.js'
    }
    });

  • 导入所需组件中的模块
    import*作为“模块变量”中的变量名称

现在,您可以使用此组件中的库。 希望能成功:)