Working version with Code Mirror