Reply To: cssContainer, inline display, and before/after text

PennController for IBEX Forums Support cssContainer, inline display, and before/after text Reply To: cssContainer, inline display, and before/after text

#9551
Jeremy
Keymaster

Hi,

In order to really get an uninterrupted flow, you need to have simple text nodes surrounding the textarea node, and have both the textarea and its container’s display style set to inline. You won’t be able to achieve that by only PennController’s print (or before/after) command on Text elements, since it introduces embedded nodes

However, you can use the javascript functions after and before to insert simple text nodes around the textarea element:

newTextInput("filledInBlank")
    .size("6em", "1.5em")
    .lines(0)
    .css({display:"inline",outline:"none",resize:"none",border:0,padding:0,margin:0,"vertical-align":"-.33em","background-color":"yellow","border-bottom":"2px solid black"})
    .cssContainer("display","inline")
    .print()
,
newFunction( ()=>{
    const textinput = document.querySelector("textarea.PennController-filledInBlank");
    textinput.before("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad  ");
    textinput.after(" veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.");
}).call()

Jeremy