mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
17 lines
No EOL
302 B
CoffeeScript
17 lines
No EOL
302 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.directive "expandableTextArea", () ->
|
|
restrict: "A"
|
|
link: (scope, el) ->
|
|
resetHeight = () ->
|
|
console.log el.val()
|
|
el.css("height", "auto")
|
|
el.css("height", el.prop("scrollHeight"))
|
|
|
|
scope.$watch (() -> el.val()), resetHeight
|
|
|
|
resetHeight()
|
|
|
|
|
|
|