integrate editor templates into editor-helpers
save document using json to avoid innerHTML normailization