我想调整jHtml TextArea的大小,就像普通文本区域一样,所以有什么方法可以调整大小。调整大小jHtml文本区域
以下是创建jHtml Textarea的代码。
下面是HTML代码:
<table style="width: 100%; border-collapse: separate !important; border-spacing: 2px!important">
<tr>
<td>
<%=Html.LabelFor(m => m.Description)%>
</td>
<td>
<%=Html.TextAreaFor(m => m.Description, new { @class="form-control",style="width: 610px; height: 150px" })%>
</td>
</tr>
</table>
及以下的javascript代码:
<script type="text/javascript">
$(function() {
$("#Description").htmlarea({
// Override/Specify the Toolbar buttons to show
toolbar: [
["bold", "italic", "underline", "|", "forecolor"],
["p", "h3", "h4", "h5", "h6"],
["link", "unlink", "|", "image"],
["orderedlist", "unorderedlist"],
["increasefontsize", "decreasefontsize"],
["indent", "outdent"],
["justifyleft", "justifycenter", "justifyright"],
["cut", "copy", "paste"]
]
});
});
</script>
嘿,它的工作。非常感谢 – ifour