I have sometimes impailed squashes , zucchini and cucumbers on pointed pieces of wood/roots that are in the tank or I will simply stick a stainless steel fork in the veg and it drops to the bottom - when the fish have eaten it I lift it up.
Third way is to use a suction cup with a clip for a heater or airline and impail it on that and then stick it to the inside glass.