定制 philippfrenzel/yii2-textareaautosize 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

philippfrenzel/yii2-textareaautosize

最新稳定版本:1.2.0

Composer 安装命令:

composer require philippfrenzel/yii2-textareaautosize

包简介

Yii2 textareaautosize Widgets

README 文档

README

JQuery Fullcalendar Yii2 Extension JQuery from: http://arshaw.com/fullcalendar/ Version 2.1.1 License MIT

JQuery Documentation: http://arshaw.com/fullcalendar/docs/ Yii2 Extension by philipp@frenzel.net

A tiny sample can be found here: http://yii2textareaautosize.beeye.org

Latest Stable Version Build Status Code Climate Version Eye License

Installation

Package is although registered at packagist.org - so you can just add one line of code, to let it run!

add the following line to your composer.json require section:

  "philippfrenzel/yii2-textareaautosize":"*",

And ensure, that you have the follwing plugin installed global:

php composer.phar global require "fxp/composer-asset-plugin:~1.0"

Changelog

29-11-2014 Updated to latest 2.2.3 Version of the library

Usage

Quickstart Looks like this:

  <?= net\frenzel\textareaautosize\yii2textareaautosize::widget([
      'model'=> $model,
      'attribute' => 'fieldname',
  ]);

  //or to use with form

  echo $form->field($model, 'amount')->widget(net\frenzel\textareaautosize\yii2textareaautosize::classname(), [
      --options--
  ]);

Minimum CSS Requirements

The only requirement is to set box-sizing: border-box and a min-height on the textarea. In the example below, the minimum height is one line of text which is determined from the base font size, line height, and vertical padding and border.

textarea {
  box-sizing: border-box;
  max-height: 94px; /* optional, but recommended */
  min-height: 31px;
  overflow-x: hidden; /* for Firefox (issue #5) */
}

Increase the min-height to have more initial rows. Once text exceeds that minimum height the textarea will expand naturally. The overflow-x setting is for Firefox to prevent an initial additional line from appearing.

统计信息

  • 总下载量: 853
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-07