mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 05:21:00 +00:00
9 lines
255 B
JavaScript
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)
|