I think you have two options. You can use Lift's funcMap
to add the function directly to your existing textarea
. This will not modify anything except to add a name attribute directly to your tag. This is similar to what Lift does internally with SHtml.textarea
.
"*" #> {
fmapFunc(SFuncHolder((t) => //do something))(funcName =>
"* [name]" #> funcName
)
}
The other is to grab the attributes from within the CSS Selector and pass them to your transformation, like this:
"*" #> { ns:NodeSeq =>
ns.map{ n =>
val ta = SHtml.textarea("", (t) => //do something)
ta % n.attributes
}
}
That will use SHtml.textarea
to create an input, and then add all of the attributes from the existing element to the new one.