Я пытался использовать ссылку https://ckeditor.com/cke4/addon/wordcount, но у меня возникла проблема с импортом библиотеки в формате angular. Ниже приведен код:
name.component.ts
inlineEditorConfig = {
uiColor: '#ffffff',
toolbarGroups: [
{ name: 'basicstyles', groups: ['basicstyles', 'cleanup'] },
{ name: 'colors' }],
resize_enabled: false,
removePlugins: 'elementspath,save,magicline',
extraPlugins: 'divarea,smiley,justify,indentblock,colordialog,colorbutton',
colorButton_foreStyle: {
element: 'font',
attributes: { color: '#(color)' }
},
height: 188,
removeDialogTabs: 'image:advanced;link:advanced',
removeButtons: 'Subscript,Superscript,Anchor,Source,Table',
format_tags: 'p;h1;h2;h3;pre;div', };
name.component.html
<div class="col-md-8">
<ckeditor
formControlName = 'groom'
*ngIf="inline"
[config]="inlineEditorConfig"
type="inline" tagName="textarea"
[(data)]="inputTag1"
(change)="inputData.groom = inputTag1"
>
</ckeditor>
</div>