MCPcopy
hub / github.com/antonmedv/codejar / insert

Function insert

codejar.ts:513–521  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

511 }
512
513 function insert(text: string) {
514 text = text
515 .replace(/&/g, '&')
516 .replace(/</g, '&lt;')
517 .replace(/>/g, '&gt;')
518 .replace(/"/g, '&quot;')
519 .replace(/'/g, '&#039;')
520 document.execCommand('insertHTML', false, text)
521 }
522
523 function debounce(cb: any, wait: number) {
524 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