Files: 7cf35de753155a880bece2498dee7cb02c01f251 / modules / compose.js
448 bytesRaw
1 | var h = require('hyperscript') |
2 | //this decorator expects to be the first |
3 | exports.message_compose = function (el, meta, sbot) { |
4 | if(el) return el |
5 | |
6 | meta = meta || {} |
7 | var ta = h('pre.editable.fixed', 'HELLO') |
8 | ta.setAttribute('contenteditable', '') |
9 | |
10 | return h('div', h('div.column', ta, |
11 | h('button', 'publish', {onclick: function () { |
12 | meta.text = ta.innerText || ta.textContent |
13 | alert(JSON.stringify(meta, null, 2)) |
14 | }}))) |
15 | } |
16 | |
17 | |
18 | |
19 |
Built with git-ssb-web