Add editor max doc length checks to codemirror GitOrigin-RevId: 0a458fc3aa23f22b078c6607ee4347bc76c371e9