The error "System Events got an error: Can’t make {"TextEdit"} into type integer." is telling you the problem. {"TextEdit"} is a list with one item. That's what you get back from the "choose from list" statement. Therefore change that statement to this...
set selectedEditor to item 1 of (choose from list the editorList)
That will give you "TextEdit", which is a string, as opposed to {"TextEdit"} which is a list.
Also, this statement is unnecessary because myEditors is already a list as evidenced by the brackets around it. Just use myEditors directly in the "choose from list" command.
set the editorList to myEditors as list