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.

Text Line Formatting Tool

TODO: Pull subtitle into page object
Add lines

this is a set of lines

Debugging Stuff

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

        -- title

Text Line Formatting Tool

This lets you drop in a set of lines and add a little
formatting to the front or end of them. 

-- html

<input type="text" id="preface_text" value="-- ">

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

<br />

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


this is 
a set 
of lines

-- 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) {
          return `${preface_text.value}${x}\n`

        } else {
          return `${preface_text.value}${x}`
        }
        } else {
        return ""
        }
      }
    )
    end_text.value = payload.join("\n").trim()
}

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


-- categories
-- Tools 

-- metadata
-- date: 2023-07-17 16:42:23
-- id: 2sipgzmv
-- site: aws
-- type: tools 
-- status: published