{{-- TinyMCE --}}
@if (config('settings.listing_form.wysiwyg_editor') == 'tinymce')
@php
$editorI18n = \Lang::get('tinymce', [], config('app.locale'));
$editorI18nJson = '';
if (!empty($editorI18n)) {
$editorI18nJson = collect($editorI18n)->toJson();
// Convert UTF-8 HTML to ANSI
$editorI18nJson = convertUTF8HtmlToAnsi($editorI18nJson);
}
@endphp
@endif
{{-- CKEditor --}}
@if (config('settings.listing_form.wysiwyg_editor') == 'ckeditor')
@php
$transUriPath = 'assets/plugins/ckeditor/translations/';
$transFileDir = public_path($transUriPath);
$editorLocale = '';
if (file_exists($transFileDir . getLangTag(config('app.locale')) . '.js')) {
$editorLocale = getLangTag(config('app.locale'));
}
if (empty($editorLocale)) {
if (file_exists($transFileDir . config('lang.tag') . '.js')) {
$editorLocale = config('lang.tag');
}
}
if (empty($editorLocale)) {
if (file_exists($transFileDir . strtolower(config('lang.tag')) . '.js')) {
$editorLocale = strtolower(config('lang.tag'));
}
}
if (empty($editorLocale)) {
$editorLocale = 'en';
}
@endphp
@if ($editorLocale != 'en')
@endif
@endif
{{-- Summernote --}}
@if (config('settings.listing_form.wysiwyg_editor') == 'summernote')
@php
$transUriPath = 'assets/plugins/summernote/lang/summernote-';
$transFileDir = public_path($transUriPath);
$editorLocale = '';
if (file_exists($transFileDir . getLangTag(config('app.locale')) . '.js')) {
$editorLocale = getLangTag(config('app.locale'));
}
if (empty($editorLocale)) {
if (file_exists($transFileDir . config('lang.tag') . '.js')) {
$editorLocale = config('lang.tag');
}
}
if (empty($editorLocale)) {
if (file_exists($transFileDir . strtolower(config('lang.tag')) . '.js')) {
$editorLocale = strtolower(config('lang.tag'));
}
}
if (empty($editorLocale)) {
$editorLocale = 'en-US';
}
@endphp
@if ($editorLocale != 'en-US')
@endif
@endif
{{-- Simditor --}}
@if (config('settings.listing_form.wysiwyg_editor') == 'simditor')
@php
$editorI18n = \Lang::get('simditor', [], config('app.locale'));
$editorI18nJson = '';
if (!empty($editorI18n)) {
$editorI18nJson = collect($editorI18n)->toJson();
// Convert UTF-8 HTML to ANSI
$editorI18nJson = convertUTF8HtmlToAnsi($editorI18nJson);
}
@endphp
@endif