自定义CKEditor 5在angular 8应用中完全没有工具栏。

问题描述 投票:0回答:1

我安装了ckeditor和它的经典版本,如下图。

npm install --save @ckeditor/ckeditor5-angular
npm install --save @ckeditor/ckeditor5-build-classic

由于我想添加很多插件,我使用了ckeditor的 在线建筑商 来创建一个自定义的构建。我只复制了 "build "文件夹到我的angular应用程序的src文件夹中。

做了一个通常的

npm install

在我的模块中导入了该模块,如下图。

import { CKEditorModule } from '@ckeditor/ckeditor5-angular';

@NgModule({
declarations: [
AppComponent
],
imports: [
  BrowserModule,
  CKEditorModule,
  FormsModule
],

而在我的组件中

import * as Editor from '../ck-build/build/ckeditor';

public Editor = Editor;

而在html页面中,它是一个简单的表格

  <form>
    <ckeditor name="title" [(ngModel)]="title" [editor]="Editor"></ckeditor>
  </form>

现在,当我运行应用程序时,我得到的编辑器没有工具栏。我得到编辑器和模型数据,但没有工具栏。

谁能帮帮我,我可能在这里做错了什么?

PS - 控制台中没有错误

angular angular8 ckeditor5
1个回答
0
投票

我也遇到了同样的问题,当编辑器有[config]attriubte与工具栏项目时,问题就解决了。而且编辑器需要引导为DecoupledEditor(就像这个例子)=&gt。https:/ckeditor.comdocsckeditor5latestbuildsguidesintegrationframeworksangular.html。

© www.soinside.com 2019 - 2024. All rights reserved.