Search code examples
htmlangulartinymce

Angular: Storing Values from TinyMCE Editor


Is there a way to do this? I am not using the usual

<textarea> 

way, but instead the editor is being called from

<app-tinymce-editor>. 

I want to save the text in the editor to a variable so it can be displayed in a specific format.

Thanks!


Solution

  • The documentation of tinymce-angular suggests either using a two way binding via ngModel

    <editor [(ngModel)]="dataModel"></editor>
    

    or an onChange handler event binding

    <editor (onSelectionChange)="handleEvent($eventObj)"></editor>