James K gives a full answer for American English.
However, one might ask why "editted" is not seen even in British English, which has several examples that contradict the stress-based rule (as pointed out by rexkogitans). The reason for this is that in British English it depends also on the consonant in question. Compare these quotes from Fowler's Modern English Usage (not actually all that modern as I only have an old edition to hand, but at least it gives the traditional BrE usage; I have edited to omit unnecessary examples).
For -ll- vs -l-:
Final l is treated differently in British, but not American, usage from most final consonants, the rule being to double it, if single, in inflexions & in some derivatives, irrespective of the position of the accent.
For -tt- vs -t-:
Words of more than one syllable follow the rule for monosyllables [doubling only if they immediately follow a single-letter vowel] if their last syllable is accented; but otherwise they do not double it.
For -pp- vs -p-:
Words of more than one syllable follow the rule for monosyllables if their last syllable is accented; they also double the p if they have a clear ă or ŏ as opposed to the obscure sound in jalap & gallop, or if, like horsewhip & sideslip, they are compounded with a monosyllable; but otherwise they do not double it except worship.