Clamp editor size to content