I’m trying to show multiple NgxEditor
on the same page but only the last editor is loading correctly with textarea. The other editors doesn’t load the textarea. If I make changes in the menu of the other editors, it reflects in the last editor.
I don’t see any error in the console.
Here’s an example code with 2 editors. I don’t know how to separate between them so that it works independently.
<div class="NgxEditor__Wrapper">
<ngx-editor-menu [editor]="editor"> </ngx-editor-menu>
<ngx-editor [editor]="editor" [ngModel]="htmlOne" [disabled]="false" [placeholder]="'Type here...'"></ngx-editor>
</div>
<div class="NgxEditor__Wrapper">
<ngx-editor-menu [editor]="editor"> </ngx-editor-menu>
<ngx-editor [editor]="editor" [ngModel]="htmlTwo" [disabled]="false" [placeholder]="'Type here...'"></ngx-editor>
</div>
Here’s the .TS file:
import { Editor } from 'ngx-editor';
export class myIpComponent implements OnInit {
htmlOne = '';
htmlTwo = '';
public editor = new Editor()