Set up text editor with the database