类型 CodeEditorSnapshot

API 文档由 Go 源码生成,内容为英文。

type CodeEditorSnapshot struct {
	TextareaSnapshot
	Language  string
	Highlight func(language, line string, dst []CodeEditorRun) []CodeEditorRun
	// ScrollbarID enables a vertical scrollbar. Route pointer events to Pointer.
	ScrollbarID ui.ID
}

CodeEditorSnapshot reuses native Textarea input, IME, selection and wrapping. Highlight owns the language grammar. The component never changes source text.