Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email-editor support under the NgbModal? #91

Open
chaklasiyanikunj opened this issue Nov 2, 2022 · 0 comments
Open

email-editor support under the NgbModal? #91

chaklasiyanikunj opened this issue Nov 2, 2022 · 0 comments

Comments

@chaklasiyanikunj
Copy link

I tried to Put an email editor inside the NgbModal. But, it gives an editor undefined.

<button class="btn btn-primary" (click)="openDialog(openModal)">>Open Dialog</button>

<ng-template #openModal let-modal>
    <div class="modal-header bg-white">       
    </div>
    <div class="modal-body bg-white pl-0 pr-0 pt-0 pb-0">
           <email-editor #emailEditor (loaded)="editorLoaded()" (ready)="editorReady()"></email-editor>
    </div>
</ng-template>


openDialog() {
 this.modalService.open(targetModal, {
        size: 'md',
        backdrop: true
      });
}
  
public editorLoaded() {
}

public editorReady() {
     this.emailEditor?.editor?.loadDesign();
}

public exportHtml() {
      //Here it gives the error
     //core.mjs:6494 ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'editor')
     //TypeError: Cannot read properties of undefined (reading 'editor')

      this.emailEditor.editor.exportHtml((data) => {
      });

 }

Does anyone know if this works with NgbModal or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant