@props([
'name' => 'body',
'value' => '',
'rows' => 4,
'required' => false,
'maxlength' => 4096,
'placeholder' => '',
'id' => null,
'hint' => '*bold* _italic_ ~strike~ `code`',
])
@php
$editorId = $id ?? 'wa-editor-' . \Illuminate\Support\Str::random(8);
@endphp
{{--
Reusable WhatsApp-style rich-text editor. Drop into any form:
The visible affordances (bold/italic/strike/code/emoji) wrap the
selection with WhatsApp's plain-text markdown — the same syntax the
chat thread already renders. The component is wired by
resources/js/wa-editor.js, which auto-initialises every
[data-wa-editor] node on DOMContentLoaded.
--}}
{{-- Emoji panel — absolute-positioned so opening it doesn't push
the surrounding form fields. Populated lazily by
wa-editor.js on first open. --}}