Angular CKEditor占位符角度2
我有一些问题与ng2 ckeditor,我需要把占位符上,但我真的不知道如何在角2这样做Angular CKEditor占位符角度2,angular,typescript,ckeditor,placeholder,Angular,Typescript,Ckeditor,Placeholder,我有一些问题与ng2 ckeditor,我需要把占位符上,但我真的不知道如何在角2这样做 <ckeditor [config]="config" [(ngModel)]="text" [ngModelOptions]="{standalone: true}" (change)="updateRemainingCharacters()" > </ckeditor> 但它不
<ckeditor
[config]="config"
[(ngModel)]="text"
[ngModelOptions]="{standalone: true}"
(change)="updateRemainingCharacters()"
>
</ckeditor>
但它不起作用添加JS:
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
希望这有帮助 以下是如何在
CKEditor-5
<ckeditor [config]="{ placeholder:'Placeholder Text', toolbar: [ 'bold', 'italic', 'bulletedList' ] }">
</ckeditor>
谢谢您的回复,但它不起作用。您是否知道如何在此占位符中定义任何文本并使用其他配置添加占位符?好的,这是一些误解,我需要在公共输入中包含一些类似占位符的内容,例如“在此处放置文本…”,在我放置任何文本时,这些内容都会消失,我认为这将对您有所帮助:请看这篇文章,链接库中也提供了完整的示例:
<ckeditor
[(ngModel)]="text"
[config]="{extraPlugins:'placeholder'}">
</ckeditor>
<ckeditor [config]="{ placeholder:'Placeholder Text', toolbar: [ 'bold', 'italic', 'bulletedList' ] }">
</ckeditor>