add close action
register DocumentPrivate in EditorPrivate instance