primeng
primeng copied to clipboard
Component: Editor isn't functional within dialogs
Describe the bug
Since the EditorModule fix doesn't support SSR in v17.13.0, the editor isn't functional within dialogs. The same issue persists in 17.14.x. Reverting to the 17.12.x fix leaves you with a choice between this functionality and SSR compatibility. https://github.com/primefaces/primeng/issues/8817
Environment
Angular version 17.3.5 PrimeNG version 17.13.0 - 17.14.x Node version 18.19.1
Reproducer
No response
Angular version
17.3.5
PrimeNG version
17.13.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.19.1
Browser(s)
All
Steps to reproduce the behavior
Open a dialog panel (p-dialog) containing an Editor, it dosent work and don't have styles.
Expected behavior
No response
I hope this will be fixed soon. I'm blocked on the project because of this issue. #14931
You should put the editor inside if block, so it gets initialized on when the visible state changes, like below. I use it like this and it works jus fine.
<p-dialog
header="some header"
[modal]="true"
[(visible)]="visible"
[style]="{ width: '50rem' }"
[breakpoints]="{ '1199px': '75vw', '575px': '90vw' }"
[maximizable]="true"
>
@if (visible) {
<p-editor></p-editor>
}
</p-dialog>