fix editor.serialize() function to handle embeds addon