defmodule LivebookWeb.HomeLive.ImportContentComponent do use LivebookWeb, :live_component @impl true def mount(socket) do {:ok, assign(socket, content: "")} end @impl true def render(assigns) do ~H"""
Import notebook by directly pasting the live markdown content.
<.form :let={f} for={:data} id="import-content" phx-submit="import" phx-change="validate" phx-target={@myself} autocomplete="off" > <%= textarea(f, :content, value: @content, class: "input resize-none", placeholder: "Notebook content", autofocus: true, aria_labelledby: "import-from-content", spellcheck: "false", rows: 5 ) %>