Allow editing docs from a view
cherry-picked first try