SIGN IN SIGN UP

docs: Fix EditorState::new() API usage in editor documentation (#2739)

The editor documentation showed an outdated `EditorState::new` signature
that accepted a language string as the first argument. The current API
accepts only `window` and `cx`, with language set via the `.language()`
builder method.

## Description

Fixes all three editor documentation files to match the current API:

- `website/docs/components/editor.md`
- `website/zh-CN/docs/components/editor.md`
- `website/base/primitives/editor.md`

**Before:**
```rust
EditorState::new("rust", window, cx)
    .line_number(true)
```

**After:**
```rust
EditorState::new(window, cx)
    .language("rust")
    .line_number(true)
```

Updated accompanying prose to describe `.language()` as the builder
method rather than a constructor argument.

## Screenshot

N/A — documentation-only change.

## How to Test

Review the updated markdown files to confirm code examples match the
current `EditorState` API.

## Checklist

- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document and
followed the guidelines.
- [ ] Reviewed the changes in this PR and confirmed AI generated code
(If any) is accurate.
- [ ] Passed `cargo run` for story tests related to the changes.
- [ ] Tested macOS, Windows and Linux platforms performance (if the
change is platform-specific)

<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #2738

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: huacnlee <5518+huacnlee@users.noreply.github.com>
C
Copilot committed
da4f93696dc2b2b4d91bcc42412b9053a3d24de8
Parent: bd83329
Committed by GitHub <noreply@github.com> on 8/16/2026, 9:57:35 AM