MCPcopy
hub / github.com/NitroRCr/AIaW / insert

Function insert

src/utils/codejar.ts:515–523  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

513 }
514
515 function insert(text: string) {
516 text = text
517 .replace(/&/g, '&')
518 .replace(/</g, '&lt;')
519 .replace(/>/g, '&gt;')
520 .replace(/"/g, '&quot;')
521 .replace(/'/g, '&#039;')
522 document.execCommand('insertHTML', false, text)
523 }
524
525 function debounce(cb: any, wait: number) {
526 let timeout = 0

Callers 5

handleNewLineFunction · 0.85
legacyNewLineFixFunction · 0.85
handleTabCharactersFunction · 0.85
handlePasteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected