[BUGFIX] RTE: Edit element dialogue may raise JavaScript error