Functions for initialization and replacing the editor content