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

p-editor (Quill) does not update when embedded in a p-dialog #16506

Open
ratsey opened this issue Oct 8, 2024 · 2 comments
Open

p-editor (Quill) does not update when embedded in a p-dialog #16506

ratsey opened this issue Oct 8, 2024 · 2 comments
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Milestone

Comments

@ratsey
Copy link

ratsey commented Oct 8, 2024

Describe the bug

Updating the underlying form controls does not reflect in a p-editor when contained within a p-dialog.

Environment

PrimeNG 18-beta2, Quill 2.0.2, Angular 18

Reproducer

https://stackblitz.com/edit/lww9qn-wjlfvd

Angular version

18.2.5

PrimeNG version

18.0.0-beta.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.20.3

Browser(s)

No response

Steps to reproduce the behavior

See Stackblitz. Note how the first editor shows an updated content when clicking Edit, the p-dialog version retains the original content

Expected behavior

Both editors show the updated content

@ratsey ratsey added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 8, 2024
@mehmetcetin01140 mehmetcetin01140 modified the milestones: 17.18.12, 17.18.13 Nov 13, 2024
@mertsincan mertsincan modified the milestones: 17.18.13, 18.0.0-rc.2 Nov 19, 2024
@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 19, 2024
@mertsincan mertsincan removed this from PrimeNG Nov 20, 2024
@cetincakiroglu cetincakiroglu self-assigned this Nov 21, 2024
@mertsincan mertsincan removed this from PrimeNG Dec 2, 2024
@mertsincan mertsincan added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

@swapnil0545
Copy link

From what I observed during the deugging of this issue.
Solution 1. the p-editor inside of the dialog gets initialized earlier even before the dialog is visible, this is what the problem is.
To fix this, I have wrapped the p-editor inside of dialog inside a @if(dialogvisible){} wrapper.
Solution 2. It works when we patch the formvalue inside of a setimeout function of 1s. (But yes, we have timeouts).
Solution 3.You can use OnInit on p-editor inside of dialog and do editorInstance.clipboard.dangerouslyPasteHTML()

@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
Status: Review
Development

No branches or pull requests

5 participants