Reputation: 444
i've got some troubles with ng2-ckeditor, I need to put placeholder on it, but I dont really know how to do this in angular 2
<ckeditor
[config]="config"
[(ngModel)]="text"
[ngModelOptions]="{standalone: true}"
(change)="updateRemainingCharacters()"
>
</ckeditor>
Is there solution for that using config? I tried
this.config.placeholder = 'some value';
but it doesn't work
Upvotes: 2
Views: 2496
Reputation: 28859
Here is how you can add placeholder
in CKEditor-5
<ckeditor [config]="{ placeholder:'Placeholder Text', toolbar: [ 'bold', 'italic', 'bulletedList' ] }">
</ckeditor>
Upvotes: 2
Reputation: 1018
Add JS:
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
Here add extraPlugins:'placeholder' in [config]
<ckeditor
[(ngModel)]="text"
[config]="{extraPlugins:'placeholder'}">
</ckeditor>
Hope this helps!
Upvotes: 0