Angular 10+ ckedtior5+结盟

发布于 2025-02-13 00:24:06 字数 951 浏览 0 评论 0原文

我试图使该编辑器起作用。

我已经从NPM安装了三个基本编辑器模块,

"@ckeditor/ckeditor5-angular": "^4.0.0",
"@ckeditor/ckeditor5-build-classic": "^34.2.0",
"@ckeditor/ckeditor5-alignment": "^34.2.0",

基本编辑器运行良好,但是我找不到使对齐模块可行的方法。 这是我的配置:

import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';

 var editorConfig: Object = {
      toolbar: {
        items: [
          'heading',
          '|',
          'bold','italic','link',
          'bulletedList',
          'numberedList',
          '|',
          'alignment:left', 'alignment:right', 'alignment:center', 'alignment:justify',
          'imageUpload',
          'blockQuote',
          'undo',
          'redo'
        ]
      },
      plugins : [ Alignment ]
    };

当我添加对齐插件时,汇编破坏了无限错误:

./node_modules/@ckeditor/ckeditor5-core/theme/icons/align-bottom.svg:1:0 - Error: Module parse failed: Unexpected token (1:0)

Im trying to make this editor works.

I've installed the three basic editor module from NPM

"@ckeditor/ckeditor5-angular": "^4.0.0",
"@ckeditor/ckeditor5-build-classic": "^34.2.0",
"@ckeditor/ckeditor5-alignment": "^34.2.0",

The basic editor works well but I cant find a way to make Alignment module works.
This is my configuration:

import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';

 var editorConfig: Object = {
      toolbar: {
        items: [
          'heading',
          '|',
          'bold','italic','link',
          'bulletedList',
          'numberedList',
          '|',
          'alignment:left', 'alignment:right', 'alignment:center', 'alignment:justify',
          'imageUpload',
          'blockQuote',
          'undo',
          'redo'
        ]
      },
      plugins : [ Alignment ]
    };

When I add Alignment plugin, compile broke with an infinite errors likes:

./node_modules/@ckeditor/ckeditor5-core/theme/icons/align-bottom.svg:1:0 - Error: Module parse failed: Unexpected token (1:0)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文