Clean the squid, throwing away the intestines and the ink sacs since the ink is not needed in this recipe. Remove and chop the tentacles very finely together with the ham and 2 tomatoes. Add salt and pepper, and a little chopped parsley. The mixture should be quite thick. Stuff the squid with it, but not quite full, and fasten each with a toothpick.
Cook the chopped onion gently in oil