Liveview Text Search and Highlight Example App: Revision history

Jump to: navigation, search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

31 July 2025

  • curprev 14:5814:58, 31 July 2025Admin talk contribs 1,302 bytes +1,302 Created page with "<source> # lib/my_app_web/live/json_search_live.ex defmodule AppWeb.SandboxLive do use AppWeb, :live_view def mount(_params, _session, socket) do {:ok, assign(socket, text: "Hello world! This is a test. Hello again!", search: "")} end def handle_event("search_change", %{"value" => search}, socket) do {:noreply, assign(socket, search: search)} end def handle_event("text_change", %{"value" => text}, socket) do {:noreply, assign(socket, text: text..."