Estoy tratando de usar este modo inline pero tengo muchos problemas con él. De alguna manera, el estilo se está eliminando y recibo este error sobre reading 'config' . Quería asegurarme de que estaba configurando la configuración para este control usando el editor de objetos. Cualquier ayuda sería genial.
No se pueden leer las propiedades de undefined (leyendo 'config')
vista
<div class="col-sm-10"> <div class="controls"> <textarea id="indicationElementId" formControlName="indicationContent" class="form-control" [(ngModel)]="item.ValueName" placeholder="Indication text" [class.has-error]="indicationContentNeedsErrorClass"> </textarea> </div> </div>t
CKEDITORInitializer() { if ((<any>window).CKEDITOR.instances.indicationElementId) (<any>window).CKEDITOR.instances.indicationElementId.destroy(); (<any>window).CKEDITOR.instances["indicationElementId"]; let editor = (<any>window).CKEDITOR.inline("indicationElementId", { keystrokes: [ [13 /*Enter*/, 'doNothing'], [(<any>window).CKEDITOR.SHIFT + 13, 'doNothing'] ], enterMode: 2, toolbar: [ { name: 'basicstyles', items: ['Bold', 'Italic', 'Subscript', 'Superscript'] }, { name: 'insert', items: ['SpecialChar'] }, { name: 'source', items: ['Sourcedialog'] } ], specialChars: ['©', '®', '–', '¾', '≥', '≤'], removeButtons: '', extraPlugins: 'sourcedialog' }); editor.CKEDITOR.config.allowedContent = true; editor.CKEDITOR.config.autoParagraph = false; editor.CKEDITOR.disableAutoInline = true; editor.on("change", () => { this.ngZone.run(() => { this.item.ValueName = this.getContent(); this.indicationContentChanged.next(null); }); });producción
el problema está tratando de establecer la configuración. Poder intentar:
editor.config.set('allowedContent', true); editor.config.set('autoParagraph', false); editor.config.set('disableAutoInline', true);