How to Set Text Area Height According to Text Size in IBM BAW Coach

Selcuk
Apr 5, 2024

If we need to set text area size in IBM BAW according to the text size we can do it like below.

Return Text service is just returning the text example:

When I execute this service the result is like below:

But if we would like to set the size of text area according to the text size we can add this code to our coach view:

document.getElementById(‘textarea-textarea-cv1:Text_Area1’).style.height = document.getElementById(‘textarea-textarea-cv1:Text_Area1’).scrollHeight + “px”

scrollHeight property is returning the actual text size in px.

Now the text are is set automatically with the size of the text.

--

--

Selcuk

IBM BPM/BAW Developer #Java #IBMCloud #IBMBPM #IBMBAW #BPM #CAMUNDA