you can use /savebuf with the close event of the dialog to save all the contents of the edit, and reload it in the init with /loadbuf

using a variable for that part will rapidely exceed mIRC's variable length limit which is only 955 chars