Bold BI®Unlock stunning dashboards with Bold BI®: 35+ widgets, 150+ data sources, AI agent & more. Try it for free!
When using an SfRichTextEditor in Markdown Editor Mode inside of a SfDialog where IsModal is 'true', the height of the RTE does not render properly. I make calls to rteObj.RefreshUIAsync() in both the Created callback for the RTE and the Opened callback of the dialog, to no avail. When in Markup mode, the issue is not present.
The issue is reproduced in the following Syncfusion playground.
Please provide any insight as to how I can resolve this issue.
Thank you.
Hi Hunter Malley,
Thank you for reaching out.
We have reviewed your query and found that the issue does not occur in our local environment but is reproducible in the online playground sample. This may be due to the editor's height being calculated before the dialog opens.
To resolve this, we recommend explicitly setting the Height property of the SfRichTextEditor.
Screenshot Reference:
Sample Link: https://blazorplayground.syncfusion.com/rjhoNqDQJIPNxLcy
Could you please try this solution and let us know if the issue persists?
Looking forward to your response.
Thanks,
Bhuvaneshwari T
Thank you for your response.
I am looking to use the component to display content of varying heights and therefore do not want to set the height as a literal. Is there no way to have the height be calculated dynamically and be responsive? I assumed the calls to RefreshUIAsync() in the RTE Created() and Dialogue Opened() callbacks would recalculate the height.
Best,
Hunter
Hi Hunter Malley,
As mentioned earlier, the issue does not occur in our local environment but is reproducible only in the online playground sample.
For your reference, we have attached the sample and a screenshot.
Could you please check this in your local environment and let us know if the issue is replicated locally?
Thanks,
Bhuvaneshwari T
Good morning,
Thank you for including that sample. In the sample, it looks like a using statement for Syncfusion.Blazor.Popups is not included in the _Imports.razor. After adding that line so the content is actually presented in a Dialogue component, the issue is replicated for me locally.
Is the issue replicated locally, on your end, when the Dialogue component is properly set up?
Best,
Hunter
Hello,
I am just following up on this issue.
Best,
Hunter
await JS.InvokeVoidAsync("adjustTextareaHeight", "benefits_editable-content"); |
window.adjustTextareaHeight = (textareaId) => { let textarea = document.getElementById(textareaId); if (textarea) { textarea.style.height = "auto"; // Reset height to recalculate textarea.style.height = textarea.scrollHeight + "px"; // Set new height } }; |
Screenshot reference:
Thank you very much for providing that work around.
While that solution works, appropriately resizing the RTE on dialog open, it causes the form to be a bit jumpy when opened. The element first has the default height, and then jumps down to the correct, calculated height.
Are there any plans to address this issue with the SfRichTextEditor in Markdown mode in a future patch?
Best,
Hunter
Now you can track the status of the reported issue through this feedback,