实现可调整大小的textarea? [英] Implementing a resizable textarea?

查看:126
本文介绍了实现可调整大小的textarea?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Stackoverflow如何实现可调整大小的textarea?



这是他们自己推出的东西,还是公共可用的组件,我可以轻松地将其附加到我的网站上的textarea上?



我发现了这个问题,它并没有完全按照我的意愿去做。

autosizing-textarea



这更多地谈到了自动调整textareas的大小,而我想要你可以上下拖动。

解决方案

StackOverflow使用jQuery插件来完成此操作: TextAreaResizer



很容易验证这一点 - 只需从网站上拖动 JS 文件即可。



历史记录:当最初编写此答案时,WMD和TextAreaResizer是两个单独的插件,其中没有一个由SO开发团队编写(另请参阅: micahwittman的回答)。此外,该网站的JavaScript很容易阅读......这些都不是严格的真正了,但TextAreaResizer仍然工作得很好。

How does Stackoverflow implement the resizable textarea?

Is that something they rolled themselves or is it a publicly available component that I can easily attach to textareas on my sites?

I found this question and it doesn't quite do what I want.

autosizing-textarea

That talks more about automatically resizing textareas whereas I want the little grab-area that you can drag up and down.

解决方案

StackOverflow uses a jQuery plugin to accomplish this: TextAreaResizer.

It's easy enough to verify this - just pull the JS files from the site.

Historical note: when this answer was originally written, WMD and TextAreaResizer were two separate plugins, neither one of which was authored by the SO Dev Team (see also: micahwittman's answer). Also, the JavaScript for the site was quite easy to read... None of these are strictly true anymore, but TextAreaResizer still works just fine.

这篇关于实现可调整大小的textarea?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆