KeyboardMaestro TextArea example (larger textbox prompt) in Custom HTML

I needed a larger textbox than the default prompt, but I couldn't find a simple, ready-to-use example of a <textarea> prompt in KM, so here's the one I'm using.

After running the prompt, %HTMLResult% will contain OK or Cancel, and newNoteText is what was submitted in the textarea.

Of course you can modify the HTML to change the appearance.

KM TextArea Example.kmmacros (14.9 KB)

Based on: MACRO: Custom HTML Prompt with Dynamic Size and Position

2 Likes

Thank you for the nice macro.

One question: the dialogue box always appears in the bottom left corner of my 27" screen. Shouldn't it appear where I dragged it to when I run the macro again?

Happens for me too. I don't know the answer though.

I added the macro this is based on to the original post, that may be helpful.

1 Like

Just add a Next Engine Window Position action above the custom HTML prompt, and you can control where it appears.

-rob.

I also the HTML code for Dark Mode, just replace the <body> content with this (replacing textarea name with your variable name):

	<body style="background-color: rgb(30, 31, 28)">
		<div>
			<p><textarea name="joplinNewNoteText" rows="18" cols="52" autofocus style="font-size: 12pt;margin-left:26px;margin-top:10px; background-color: rgb(39, 40, 35); color: rgb(248, 248, 243)"></textarea></p>
<p style="text-align: center">
			<input type="button" value="OK" onclick="submitWindow('OK')" style="font-size: 10pt;"/>
		</div>
	</body>