PennController for IBEX › Forums › Support › Scale with labels and before/after text in different places › Reply To: Scale with labels and before/after text in different places
December 14, 2021 at 2:29 pm
#7615
Keymaster
Hi,
1) you’ll have to use CSS. You could do this:
.before(newText("igen").cssContainer({height:'100%',display:'flex','flex-direction':'column'}).css("margin-top","auto"))
.after(newText(" nem").cssContainer({height:'100%',display:'flex','flex-direction':'column'}).css("margin-top","auto"))
2) You’ll have to use a trick here, as the HTML textarea elements corresponding to the PennController TextInput elements need to be siblings with the surrounding text nodes in order to get the wrapping right. Here’s a suggestion:
newText("container", "Hello world. This is a very long text to see whether including a <span id='myFirstInput'></span> TextInput element inline will cause a problem when this text needs to be wrapped into two lines <span id='mySecondInput'></span> on the page").print()
,
newTextInput("test1", "").log().print(),newTextInput("test2", "").log().print()
,
newFunction(()=>{
$("#myFirstInput").after( getTextInput("test1")._element.jQueryElement ).remove();
$("#mySecondInput").after( getTextInput("test2")._element.jQueryElement ).remove();
}).call()
Jeremy