config.js ckeditor 的 angular2 文件?
config.js file in angular2 for the ckeditor?
ckeditor 的 config.js 文件(我在 vs code 的 cli 上使用 npm 安装)在哪里?我到处搜索,包括我的节点模块,但似乎找不到它。另外,我必须删除一些选项,即 ckeditor 顶部栏上的图像和媒体上传器。有人可以帮我吗
谢谢
如果你想将自己的配置添加到 ckeditor,你应该使用这样的东西:
html 文件:
<ckeditor [config]="config">
</ckeditor>
并且在 ts 文件中你应该创建 config
对象:
this.config = {
toolbar: [
['Maximize'],
['Format', 'FontSize'],
['Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat'],
['TextColor', 'BGColor'],
['NumberedList', 'BulletedList'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Table'],
['Cut', 'Copy'],
['Link', 'Unlink'],
['Undo', 'Redo']
]
};
此示例说明如何配置工具栏中可用的按钮。
您还可以在此处阅读有关与 angular 集成的示例:
https://ckeditor.com/docs/ckeditor4/latest/guide/dev_angular.html
ckeditor 的 config.js 文件(我在 vs code 的 cli 上使用 npm 安装)在哪里?我到处搜索,包括我的节点模块,但似乎找不到它。另外,我必须删除一些选项,即 ckeditor 顶部栏上的图像和媒体上传器。有人可以帮我吗
谢谢
如果你想将自己的配置添加到 ckeditor,你应该使用这样的东西:
html 文件:
<ckeditor [config]="config">
</ckeditor>
并且在 ts 文件中你应该创建 config
对象:
this.config = {
toolbar: [
['Maximize'],
['Format', 'FontSize'],
['Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat'],
['TextColor', 'BGColor'],
['NumberedList', 'BulletedList'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Table'],
['Cut', 'Copy'],
['Link', 'Unlink'],
['Undo', 'Redo']
]
};
此示例说明如何配置工具栏中可用的按钮。
您还可以在此处阅读有关与 angular 集成的示例: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_angular.html