If you wanna pop out mid ledge, I'd say you need to be really good at high backside 180s, and you should be able to pop them straight up. When I do them over traffic cones, I do a straight ollie while starting to turn my head and shoulders backside, then I whip the board around while leveling out. Sometimes I even ollie a bit frontside shifty for swag points. When doing a frontside 50-50, you can't just scoop a low backside 180 because you need to get away from the ledge, and you'll also likely slip off the ledge. Being able to ollie away from the ledge and do a late 180 is probably the key here.
If you just wanna 180 off the edge, then I guess it's just like doing it from a backside 50-50, which is obviously the easier one. You might still slip off, though, so I'd go with a straight ollie late 180 in either case.