document edit method