Hello,
I'm new to Twine, but I've been trying to figure out how to modify the textinput macro to allow multiline user input, and then save the result to a variable. Is there a straightforward way to do this, and allow textinput to use <textarea ...> or some such (e.g. <textarea name="description" cols="40" rows="5" id = "mytext"></textarea>)?
Thanks.
Wally
Comments
There are a number of ways to extend an existing object's functions but I am going to use the override technique. So using the existing <<button>> macro code as a starting point I ended up with: After adding both of the above pieces of javascript into a Script Passage you can text it by adding the following to a passage:
(note: remember to give your variables default values within the StoryInit special passage. eg. <<set $desc to "">> You can use CSS to size the textarea like so: I hope that gives you something to start with.
Thanks.
Replace the override with this new version:
==
) and are you using<<print>>
? If so, then that's your problem. The<<print>>
macro wikifies what it prints, so==
is considered the start of the strikethrough markup. The question is do you need or want wikification of the user input at all?