html - Selectable, scrollable output textarea -
how create text area scrollable, has fixed height , allows marking text? html, jsf , pf4.0 elements possible, linebreaks of original text must respected.
if use <p:inputtextarea>
, set disabled="true", when mark text cannot release cursor. continue marking whereever cursor goes. also, disabled seems block me using scrollbar.
it supposed similar activated scrollbar (doesn't matter if text greyed out):
i don't know of way p:inputtextarea
, i've used html element when i've needed that, rendered instead of disabled textarea:
<ui:fragment rendered="#{lorem.disabled}"> <div style="max-width:150px;max-height:150px;overflow-y:auto;overflow-x:auto;white-space:pre;"> #{lorem.ipsum} </div> </ui:fragment> <p:inputtextarea value="#{lorem.ipsum}" rendered="#{!lorem.disabled}"/>
Comments
Post a Comment