Update editor in js