changeset 598:ebe2b7a66b9d draft dev

Add input type="range" completion
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 16 Oct 2022 20:56:35 +0859
parents 722004cc4375
children e73e41509124
files yahtml.el
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/yahtml.el	Sat Oct 08 10:21:51 2022 +0859
+++ b/yahtml.el	Sun Oct 16 20:56:35 2022 +0859
@@ -1481,7 +1481,9 @@
 
 (defvar yahtml-input-types
   '(("text") ("password") ("checkbox") ("radio") ("submit")
-    ("reset") ("image") ("hidden") ("file")))
+    ("reset") ("image") ("hidden") ("file")
+    ("date") ("time") ("datetime-local") ("week") ("number") ("tel")
+    ("range") ("color")))
 
 (defun yahtml:input ()
   "Add-in function for `input' form"
@@ -1502,6 +1504,13 @@
      (yahtml-make-optional-argument "value" value)
      (yahtml-make-optional-argument "id" id)
      (yahtml-make-optional-argument "size" size)
+     (if (string-match "range" type)
+	 (concat (yahtml-make-optional-argument
+		  "min" (YaTeX-read-string-or-skip "min: "))
+		 (yahtml-make-optional-argument
+		  "max" (YaTeX-read-string-or-skip "max: "))
+		 (yahtml-make-optional-argument
+		  "step" (YaTeX-read-string-or-skip "step: "))))
      (yahtml-make-optional-argument "maxlength" maxlength))))
 
 (defun yahtml:datalist ()

yatex.org