Mercurial Hosting > freedit
diff src/new_thread.html.luan @ 42:0c1b820fff34
use push
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 08 Nov 2022 14:02:28 -0700 |
parents | 9674275019bb |
children | 289718f121e4 |
line wrap: on
line diff
--- a/src/new_thread.html.luan Sun Nov 06 17:39:21 2022 -0700 +++ b/src/new_thread.html.luan Tue Nov 08 14:02:28 2022 -0700 @@ -29,6 +29,18 @@ <head> <% head() %> <title><%=forum_title%>: new thread</title> + <style> + textarea { + width: 100%; + } + </style> + <script> + function uploaded(input,url,filename) { + let textarea = document.querySelector('textarea'); + textarea.focus(); + textarea.setRangeText(url,textarea.selectionStart,textarea.selectionEnd,'select'); + } + </script> </head> <body> <% header() %> @@ -39,7 +51,11 @@ <label>Subject</label> <input name=subject required> </p> - <p><textarea name=content></textarea></p> + <p><textarea name=content oninput="fixTextarea(this)"></textarea></p> + <p> + <input type=file onchange="upload(this,uploaded)"> + <button type=button onclick="fileButtonClick(this)">Upload File</button> + </p> <p><input type=submit></p> </form> </div>