better implementation of ignoring elements with editable content