Browse Source

feature: Allow arbitary HTML on argument form (useful for descriptions) (#519)

James Read 1 năm trước cách đây
mục cha
commit
f3bc82311d
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      webui.dev/js/ArgumentForm.js

+ 5 - 0
webui.dev/js/ArgumentForm.js

@@ -122,6 +122,11 @@ class ArgumentForm extends window.HTMLElement {
       }
     } else {
       switch (arg.type) {
+        case 'html':
+          domEl = document.createElement('div')
+          domEl.innerHTML = arg.defaultValue
+
+          return domEl
         case 'confirmation':
           this.domBtnStart.disabled = true