跳到主要内容

CodeSignalContext

Code editor signal context providing reactive access to code content.

Methods

append

append(code: string): void

Appends content to the end of the code.

prepend

prepend(code: string): void

Inserts content at the beginning of the code.

insert

insert(position: number, code: string): void

Inserts code at the specified position.

remove

remove(start: number, end: number): void

Deletes code from the specified range.

replace

replace(search: string, replacement: string): void

Replaces matching code.

edit

edit(changes: CodeChange[]): void

Batch edits code.