git ssb

2+

mixmix / ticktack



Commit 6cc3ba8e958c74086d517dc9dfe1236bdde29e2d

leave clearer note about why h1 is contenteditable

mix irving committed on 4/10/2018, 10:06:11 PM
Parent: 3ad00d6029fdc254261c83d438be1fe0dd4977bf

Files changed

app/page/blogNew.jschanged
app/page/blogNew.jsView
@@ -48,9 +48,12 @@
4848 placeholder: strings.channel
4949 })
5050 const updateTitle = e => {
5151 if (e.target.childElementCount) {
52- // catch people pasting html in here!
52 + // the title h1 is contenteditable, meaning people can paste html elements in here!
53 + // this is designed to strip down to heading content text
54 + // - I went with contenteditable because it handles wrapping of long titles,
55 + // whereas a styled input field just pushes content off the page!
5356 e.target.innerHTML = e.target.innerText
5457 }
5558 meta.title.set(e.target.innerText)
5659 }

Built with git-ssb-web