@props([ 'name' => '', 'value' => '', 'height' => 300, 'required' => false, 'placeholder' => null, 'locale' => null, 'direction' => null, 'language' => null ]) @php // Auto-detect locale and direction from app settings $currentLocale = $locale ?: app()->getLocale(); // Enhanced RTL detection $isRTL = $direction === 'rtl' || in_array($currentLocale, ['ar', 'he', 'fa', 'ur']) || (function_exists('get_current_direction') && get_current_direction() === 'rtl') || (session('direction') === 'rtl') || (config('app.direction') === 'rtl'); $currentDirection = $direction ?: ($isRTL ? 'rtl' : 'ltr'); $currentLanguage = $language ?: ($isRTL ? 'ar' : 'en'); // Generate unique ID $uniqueId = 'tinymce_' . uniqid() . '_' . str_replace(['[', ']', '.'], '_', $name); // NO CONTENT PROCESSING - Use raw value $rawValue = $value; // Dynamic translations $translations = [ 'loading_editor' => admin_trans('loading_editor'), 'enter_content' => admin_trans('enter_content'), 'bold' => admin_trans('bold'), 'italic' => admin_trans('italic'), 'underline' => admin_trans('underline'), 'align_left' => admin_trans('align_left'), 'align_center' => admin_trans('align_center'), 'align_right' => admin_trans('align_right'), 'align_justify' => admin_trans('align_justify'), 'bullet_list' => admin_trans('bullet_list'), 'numbered_list' => admin_trans('numbered_list'), 'link' => admin_trans('link'), 'code' => admin_trans('code'), 'fullscreen' => admin_trans('fullscreen'), 'help' => admin_trans('help'), ]; @endphp
{{ $translations['loading_editor'] }}
@error($name)

{{ $message }}

@enderror
@once @push('scripts') @endpush @endonce