1
0
Fork 0
mirror of https://git.joinplu.me/Plume/Plume.git synced 2025-02-03 00:32:23 +00:00
Plume/static/js/autoExpand.js
2018-09-01 21:42:53 +01:00

9 lines
255 B
JavaScript

function autosize () {
const el = this
el.style.height = 'auto'
el.style.height = `${el.scrollHeight}px`
}
const articleContent = document.querySelector('#content')
autosize.bind(articleContent)()
articleContent.addEventListener('keyup', autosize)