Я внедрил CKEditor 4 в проект Angular 7: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_angular.html
Есть ли способ обновить конфигурацию после инициализации редактора. Примером может быть изменение uiColor
и height
при нажатии <button>Update Config</button>
<ckeditor [config]="BodyConfig" (ready)="EditorIsReadyToGo($event)"
type="divarea" [formControl]="TestForm.controls['editorBody']"></ckeditor>
<button type="button" (click)="UpdateEditorUI()">Update Config</button>
this.BodyConfig = {
uiColor: '#a4a4a4', height: '45em',
toolbarGroups: [
{ name: 'document', groups: ['mode', 'document', 'doctools'] },
{ name: 'clipboard', groups: ['undo', 'clipboard'] },
{ name: 'editing', groups: ['find', 'selection', 'spellchecker', 'editing'] },
{ name: 'forms', groups: ['forms'] },
{ name: 'insert', groups: ['insert'] },
'/',
{ name: 'basicstyles', groups: ['basicstyles', 'cleanup'] },
{ name: 'paragraph', groups: ['align', 'list', 'indent', 'blocks', 'bidi',
'paragraph'] },
{ name: 'links', groups: ['links'] },
'/',
{ name: 'styles', groups: ['styles'] },
{ name: 'colors', groups: ['colors'] },
{ name: 'tools', groups: ['tools'] },
{ name: 'others', groups: ['others'] },
{ name: 'about', groups: ['about'] }
],
removeButtons: 'Save,NewPage,Print,Templates,SelectAll,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CreateDiv,Flash,Iframe,About,Language,ShowBlocks'
}
UpdateEditorUI(){
this.BodyConfig.uiColor: '#ffffff';
this.BodyConfig.height: '25em';
}