【发布时间】:2021-12-08 00:33:40
【问题描述】:
我在 p:dialog 中有一个 p:editor。该对话框是可拖动的,我希望编辑器填充对话框的所有可用空间。我不知道这是否纯粹是一个 HTML/CSS 问题,或者这是否与我正在使用的 JSF 组件有关。关于宽度,当我在我的子容器中设置 width: 100% 时,这很好用。当我尝试使用 height: 100% 时,它没有任何效果。这是我的代码:
<h:form id="frmNote">
<p:dialog id="dlgNote" widgetVar="dlgNote"
header="Note"
position="right"
style="height: 500px; width: 500px;"
dynamic="false" modal="false"
fitViewport="false" resizable="true"
closable="true" closeOnEscape="true"
onHide="$('#frmNote\\:quit').click();">
<p:hotkey bind="esc" handler="PF('dlgNote').hide();" />
<p:editor id="noteEditor" widgetVar="noteEditor"
value="#{backenbean.text}"
style="vertical-align: top; width: 100%; height: 100%"
controls="bold italic underline strikethrough font size color highlight bullets numbering undo redo">
</p:editor>
</p:dialog>
</h:form>
【问题讨论】:
标签: html css jsf primefaces