如何使用Ionic在CKEditor 5中设置高度?

时间:2018-10-24 11:28:28

标签: angular ionic-framework ckeditor ckeditor5

我想使用Ionic和Angular创建文本编辑器。

我使用CKEditor 5应用了它,但是高度值没有改变。

根据CKEditor 5文档,我可以通过config属性控制高度值。

我已通过config选项确认“段落”已翻译成韩文。

我的方法错误吗?

这是我的源代码。

我的源代码由'html','component.module.ts','component.ts'组成。

html模板

<ckeditor formControlName="bbsContent" [editor]="Editor" [config]="config" style="height: 300px" data=""></ckeditor>

component.module.ts

import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
imports: [
   CKEditorModule
  ],

component.ts

import '@ckeditor/ckeditor5-build-classic/build/translations/ko';
import * as ClassicEditor from '@ckeditor/ckeditor5-build-classic';

  //ckeditor
export class Classname {
  public Editor = ClassicEditor;
  public config = {
  language: 'ko',
  height: 300
  }

enter image description here

感谢阅读。

0 个答案:

没有答案