I am using Blazor Word Processor - I would like the component to fill the available space and have tried using:
<SfDocumentEditorContainer Width="100%" Height="100%" >
however this seems to render at only a height of 289px even when it has the full page to render
I have found in the html that there is an element within the docuemnt editor with a fixed height set:
<div
id="sfdocumenteditorpnh4fke3gdr_viewerContainer"
class="e-de-viewercontainer" style="position: relative; overflow: auto;
direction: ltr; outline: currentcolor none medium; height: 289px; width:
1788px; cursor: text;" tabindex="0">
This seems to be limiting the height of the component on the page
How can I set this height to 100% and get the document editor to fill the page?
<div style="height:100%">
<SfDocumentEditorContainer @ref="container" ID="editor" EnableToolbar="true" Height="590px">
<DocumentEditorContainerEvents Created="OnCreated"></DocumentEditorContainerEvents>
</SfDocumentEditorContainer>
</div>
@code {
SfDocumentEditorContainer container;
public void OnCreated(object args)
{
container.Resize();
container.DocumentEditor.Resize();
}
}
<style>
#editor {
display: block;
}
</style> |
Hi
Kurthis,
Thanks for your reply.
Sadly this does not work if you set the height to 100%. This only works if you specify the pixel height of the component.
If you change the height in your sample to 100% you will see the issue reproduced.
Cheers,
Tim
Hi Kurthis,
Thanks! Can you give me access to this feedback item so that I can track its progress and see when a fix is released?
Thanks
Tim
<div style="height:100%; width:100%">
<SfDocumentEditorContainer @ref="container" EnableToolbar="true" Height="100%">
<DocumentEditorContainerEvents Created="OnCreated"></DocumentEditorContainerEvents>
</SfDocumentEditorContainer>
</div>
@code {
SfDocumentEditorContainer container;
SfDialog DialogDocumentEditor;
public void OnCreated(object args)
{
container.Resize();
container.DocumentEditor.Resize();
}
}
|
<div style="height:100%;">
<SfDocumentEditorContainer @ref="container" EnableToolbar="true" Height="100%">
<DocumentEditorContainerEvents Created="OnCreated"></DocumentEditorContainerEvents>
</SfDocumentEditorContainer>
</div>
@code {
SfDocumentEditorContainer container;
public void OnCreated(object args)
{
container.ResizeAsync();
container.DocumentEditor.Resize();
}
} |