The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Line Assembler Text Tool

TODO: Pull subtitle into page object
Add spacer lines

alfa bravo charlie

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Line Assembler Text Tool

This is current busted. 

-- html

<input type="text" size="48" id="preface_text" value="Use {} for replacement {}">

<input type="checkbox" id="add_lines" name="add_lines" /> Add spacer lines 


-- textarea
-- id: start_text
-- cols: 60
-- rows: 14

alfa 
bravo
charlie

-- textarea
-- id: end_text
-- cols: 60
-- rows: 14


-- script

const updateLines = () => {

    let payload = start_text.value.trim().split("\n")

    payload = payload.map(x => {
      if (x.trim() != "") {
        if (add_lines.checked) {
          const response = preface_text.value.replaceAll("{}", x)
          return response
        } else {
          return preface_text.value.replaceAll("{}", x)
        }
        } else {
        return ""
        }
      }
    )
    end_text.value = payload.join("\n").trim()
}

document.addEventListener("DOMContentLoaded", () => {
    updateLines()
    document.addEventListener("input", updateLines)
  }
)

-- categories
-- Tools 

-- metadata
-- date: 2023-07-18 03:10:28
-- id: 2sje4pnl
-- site: aws
-- type: tools 
-- status: published