save changes before previewing
support for custom render functions