View Source PasteButton

<PasteButton>

Sends an event with the clipboard’s contents when tapped.

Overview

Use the phx-click attribute to specify which event to fire on tap.

<PasteButton phx-click="my_event" />
def handle_event("my_event", %{ "value" => value }, socket) do
  {:noreply, assign(socket, :pasted_value, hd(value))}
end

Events

SwiftUI Documentation

See SwiftUI.PasteButton for more details on this View.

References

Event sent when tapped.

Discussion

Sends a payload with the following format:

{
    "value": [
        "clipboard string 1",
        "clipboard string 2",
        ...
    ]
}