Get some airline and an airline joiner. Join the two ends of the airline together with the joiner. You can also use black polypipe (irrigation pipe) and a joiner, or clear plastic hose and a plastic joiner.
Get a suction cup and stick it to the side of the aquarium.
Tie a piece of string (about 6-10 inches long) to the a loop of airline and the suction cup.
Put the floating plants in the loop of airline and they should stay put. This works for true floating plants like water sprite, duckweed, water hyacinth, etc. However, it won't work with hornwort.
-----------------
You can buy round/ cylindrical sponges for some brands of internal power filter. These sponges have a hole through the centre and they fit over the intake strainer of most external power filters.