[英]HTML5 Canvas multi-line textboxes
Okay, so, essentially, I'm getting user input from an <input>
tag and shoving it into a canvas. 好的,从本质上讲,我是从
<input>
标记获取用户输入并将其推到画布中的。 This is all well and good for one line, but there are some cases where I need whole paragraphs of text. 对于一行来说,这一切都很好,但是在某些情况下,我需要整段文字。 As we are all aware, not every letter is of the same width, which means I can't have multiple
<input>
tags with a maxlength attribute. 众所周知,并非每个字母都具有相同的宽度,这意味着我不能有多个具有maxlength属性的
<input>
标签。 It's also jarring to have multiple input tags. 具有多个输入标签也很令人讨厌。 Long story short: Is there any way to put PARAGRAPH textboxes into a HTML5 canvas element?
长话短说:是否可以将PARAGRAPH文本框放入HTML5 canvas元素中?
为什么不能继续使用文本区域进行多行处理?
<textarea name="myTextArea" cols="30" rows="5" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.