我在 angular-ui-tinymce 模块中遇到了同样的问题,我通过确保包含该文件来解决此问题。
<script src="bower_components/tinymce-dist/tinymce.min.js"></script>
<script src="bower_components/angular-ui-tinymce/src/tinymce.js"></script>
这个脚本被插入到 index.html 文件bower install angular-ui-tinymce 中,并且源代码被下载并放置在适当的位置。
此外,当您在复制任务上运行 grunt build 时,它不会从 /tinymce-dist文件夹复制所需的文件,解决方案是手动添加到 复制任务 以复制您的文件夹需要。我必须在复制任务中将以下代码插入到 grunt.js 文件中,从而将 /skins /themes /plugins 文件夹直接复制到 dist/scripts 文件夹中:
// Copies remaining files to places other tasks can use
copy: {
dist: {
files: [{
...
}, {
...
}, {
expand: true,
cwd: 'bower_components/tinymce-dist/themes/modern/',
src: ['**'],
dest: '<%= yeoman.dist %>/scripts/themes/modern/'
}, {
expand: true,
cwd: 'bower_components/tinymce-dist/skins/',
src: ['**'],
dest: '<%= yeoman.dist %>/scripts/skins/'
}, {
expand: true,
cwd: 'bower_components/tinymce-dist/plugins/link/',
src: ['**'],
dest: '<%= yeoman.dist %>/scripts/plugins/link/'
}]
},
styles: {
...
}
}
这不是有史以来最好的解决方案,但它对我有用,希望它对某人有所帮助。