1

Okay, so, essentially, I'm getting user input from an <input> tag and shoving it into a canvas. 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. 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?

3

1 Answer 1

1

Why can't you go ahead and use a textarea to get multiline handling?

<textarea name="myTextArea" cols="30" rows="5" /> 
Sign up to request clarification or add additional context in comments.

3 Comments

The issue I assume is translating it to canvas.
Yes, the issue is translating to canvas. Also, it doesn't matter if the input tag itself can't linebreak, the issue is that fillText() only support a single line, and not, say, a paragraph.
You can use a custom solution for that, LINK

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.