Added more robust isContentEditable function

Applies for all cases in which an element can be editable. For #820