我想調整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