Commit 6cc3ba8e958c74086d517dc9dfe1236bdde29e2d
leave clearer note about why h1 is contenteditable
mix irving committed on 4/10/2018, 10:06:11 PMParent: 3ad00d6029fdc254261c83d438be1fe0dd4977bf
Files changed
app/page/blogNew.js | changed |
app/page/blogNew.js | |||
---|---|---|---|
@@ -48,9 +48,12 @@ | |||
48 | 48 … | placeholder: strings.channel | |
49 | 49 … | }) | |
50 | 50 … | const updateTitle = e => { | |
51 | 51 … | 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! | ||
53 | 56 … | e.target.innerHTML = e.target.innerText | |
54 | 57 … | } | |
55 | 58 … | meta.title.set(e.target.innerText) | |
56 | 59 … | } |
Built with git-ssb-web