Add a didMount constructor in editor