Add the support of edit and new function