{{-- @intent Aba "JS" do Editor Estrutural — editores empilhados (Head + Footer). @description JS Head injetado no ; JS Footer injetado antes de . @vars $contents (array) --}}
{{ csrf_field() }} {{-- ── JS Head ────────────────────────────────────── --}}

JavaScript puro injetado no <head> do portal, antes dos estilos. Use apenas para scripts críticos (ex: pré-carregamento).

@php $jhActive = $contents['js_head']->active ?? true; @endphp
@php $jhVal = $contents['js_head']->content ?? ''; @endphp @include('v2-cms::partials.code-editor', [ 'id' => 'js-head-editor', 'name' => 'areas[js_head][content]', 'value' => $jhVal, 'mode' => 'javascript', 'height' => '220px', 'label' => false, ])
{{-- ── JS Footer ──────────────────────────────────── --}}

JavaScript puro injetado via <script> antes do fechamento do </body>. Não utilize tags <script> aqui.

@php $jfActive = $contents['js_foot']->active ?? true; @endphp
@php $jfVal = $contents['js_foot']->content ?? ''; @endphp @include('v2-cms::partials.code-editor', [ 'id' => 'js-foot-editor', 'name' => 'areas[js_foot][content]', 'value' => $jfVal, 'mode' => 'javascript', 'height' => '220px', 'label' => false, ])