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):

non-scrollable

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

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -