Edge: Lua widgets now require using widget.new

Great!
I think, this again opens great possibilities!

Might come to a solution for my Idea here:

Already tried this out and I’m able to generate an input field, which fires an event on change of the inputtext.
However, I could not figure out, yet, how to get to the text I put in…

Looks like I miss a puzzle piece again :slight_smile:

My Example:

```space-lua
function myInputField(text)
  return widget.new {
    html = text .."<input type=\"text\">",
    events = {
      change = function()
        editor.flashNotification("changed " .. text)
      end
    }
  }
end

${myInputField("Input here: ")}

image

1 Like