Clip for Editing Text: strikeout deletion / bold insertion
;whacked at by don at htmlfixit dot com
;from an example by hoylesp at acm dot org
;to edit stuff with three options (1a, 1b and 2)
;1.
;if highlighted text when start, then strike that
; and a.
; nothing if text box left empty
; or b.
; replace with bolded text from prompt box if entered
;2.
;if nothing selected insert added text
;see: http://htmlfixit.com/blog/index.php?p=317 for any updates
;figure out if anything is selected and jump to subroutine
^!If ^$GetCol$ = ^$GetColEnd$ insert ELSE selection_made
;we have a selection so strike it
:selection_made
^!InsertHTML ^&
;move after the selection
^!Jump Select_End
;insert the replace with text if any is given
:insert
^!Set %replacement%=^?{Replace with}
;if nothing entered in Replace jump to end
^!If ^$IsEmpty(^%replacement%)$ = 1 End
;insert in bold with spaces on each side
;if replacement text is given