Current section
Files
Jump to
Current section
Files
lib/live/ce/ce_text_snippet_edit.html.leex
<%= f = form_for @changeset, "#", as: :step_data, theme: :tw_default,_phx_change: :validate, phx_submit: :save, phx_target: @myself, id: @id, class: "w-lg" %>
<%= live_component MavuSnippetsUi.Live.Ce.SaveBlock , class: "mb-5" %>
<%= for l <- @active_language_map do %>
<% placeholder= MavuSnippets.get_default_text_from_element(@celement,l.lang, @context[:snippets_conf]) %>
<div
class="inline-block rounded text-xs uppercase px-2 py-1 ml-2 min-w-[3em] text-center hover:ring-primary-500 hover:ring-2 bg-gray-200"
title="<%= l.langnum %>">
<%= l.lang %></div>
<%= input f, l.fieldname, ([ using: :textarea, rows: 5, label: "Text:", placeholder: placeholder ] ++
if connected?(@socket), do: [
"x-data": "{ init() {this.resize();}, resize(){ console.log('#log 3085 RESIZE'); this.$el.style.height = '5px'; this.$el.style.height = $el.scrollHeight + 'px' } }",
# "x-on:input": "resize()"
], else: [])
%>
<% end %>
</form>