Edit document