Add option in constructor to enable insert on enter