如何使用 Ionic 在 CKEditor 5 中设置高度?
How can I set height in CKEditor 5 with Ionic?
我想使用 Ionic 和 Angular 创建一个文本编辑器。
我使用 CKEditor 5 应用它,但高度值没有改变。
根据CKEditor 5文档,我可以通过config属性来控制高度值。
我已通过配置选项确认 'paragraphs' 已翻译成韩语。
我的做法是不是错了?
这是我的源代码。
我的源代码由'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
感谢阅读。
答案在 GH issue. Docs on the https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/angular.html 中,将很快更新以涵盖 Angular 组件的样式。
我想使用 Ionic 和 Angular 创建一个文本编辑器。
我使用 CKEditor 5 应用它,但高度值没有改变。
根据CKEditor 5文档,我可以通过config属性来控制高度值。
我已通过配置选项确认 'paragraphs' 已翻译成韩语。
我的做法是不是错了?
这是我的源代码。
我的源代码由'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
感谢阅读。
答案在 GH issue. Docs on the https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/angular.html 中,将很快更新以涵盖 Angular 组件的样式。