Edit plist file for TextEdit
You also need to have write permission to the directory the file is in:

sudo chown $USER /Applications/TextEdit.app/Contents/Info.plist
sudo chown $USER /Applications/TextEdit.app/Contents


After you have edited the file, change the owner of the plist and the directory back to root:

sudo chown root /Applications/TextEdit.app/Contents/Info.plist
sudo chown root /Applications/TextEdit.app/Contents


You could also run cp /Applications/TextEdit.app/Contents/Info.plist ~/Desktop/ (which changes the owner to you), edit the file on the desktop, and then run sudo cp ~/Desktop/Info.plist /Applications/TextEdit.app/Contents/Info.plist (which changes the owner back to root).

Or use another editor:

sudo nano /Applications/TextEdit.app/Contents/Info.plist