就地编辑 JQuery UI 文本区域可编辑的调整大小如何工作?
我在将 JQuery 就地编辑文本区域设置为固定大小时遇到问题。
基本上我有一个 HTML 文件,其中一部分有一个名为 editable-large 的段落:
<div class="profile">
<h2>About Me</h2>
<p class="editable-large">
Ansel Easton Adams (February 20, 1902 – April 22, 1984) was an American photographer and environmentalist, best known for his black-and-white photographs of the American West, especially in Yosemite National Park.
</p>
</div>
并且我有一个与该段落关联的 JQuery JS 文件,允许就地编辑它。因此,每当有人单击该段落时,它就会变成一个文本区域。
$(".editable-large").editable(
{ submit: "Save",
cancel: "Cancel",
type: "textarea",
options: {"cols": 80, "rows": 10},
}).css({"cols": 80,"rows": 10});
我希望文本区域具有一定的宽度和高度(80 和 10),但无论我输入什么值,它总是相同的大小,看起来像 这个。我非常感谢任何帮助使该文本区域具有固定大小的帮助。
I have problems getting a JQuery Edit-In-Place textarea to be a fixed size.
Basically I have one HTML file, part of which has a paragraph named editable-large:
<div class="profile">
<h2>About Me</h2>
<p class="editable-large">
Ansel Easton Adams (February 20, 1902 – April 22, 1984) was an American photographer and environmentalist, best known for his black-and-white photographs of the American West, especially in Yosemite National Park.
</p>
</div>
And I have a JQuery JS file associated with that paragraph that allows it to be edited in place. So whenever someone clicks on the paragraph, it turns into a textarea.
$(".editable-large").editable(
{ submit: "Save",
cancel: "Cancel",
type: "textarea",
options: {"cols": 80, "rows": 10},
}).css({"cols": 80,"rows": 10});
I want the textarea to have a certain width and height (80 & 10), but no matter what values I put in, it's always the same size and looks like this. I'd greatly appreciate any help in making that textarea a fixed size.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过给文本区域指定宽度和高度来实现这一点,例如:
You can do that be giving your textarea a width and height ex: