the roots have to be underwater and the leaves have to be above water. don't trim them you need them to get big before they really make any impact on nitrate export.
if they get too tall - just push them down a bit on the foam. eventually you'll have to set up a refugium for mangroves when they get too big - i'm probably about 4-5 months away