1 <div id="markdown-editor" component="markdown-editor"
2 option:markdown-editor:page-id="{{ $model->id ?? 0 }}"
3 option:markdown-editor:text-direction="{{ config('app.rtl') ? 'rtl' : 'ltr' }}"
4 option:markdown-editor:image-upload-error-text="{{ trans('errors.image_upload_error') }}"
5 option:markdown-editor:server-upload-limit-text="{{ trans('errors.server_upload_limit') }}"
6 class="flex-fill flex code-fill">
8 <div class="markdown-editor-wrap active">
9 <div class="editor-toolbar flex-container-row items-stretch justify-space-between">
10 <div class="editor-toolbar-label text-mono px-m py-xs flex-container-row items-center flex">
11 <span>{{ trans('entities.pages_md_editor') }}</span>
13 <div class="buttons flex-container-row items-stretch">
14 @if(config('services.drawio'))
15 <button class="text-button" type="button" data-action="insertDrawing" title="{{ trans('entities.pages_md_insert_drawing') }}">@icon('drawing')</button>
17 <button class="text-button" type="button" data-action="insertImage" title="{{ trans('entities.pages_md_insert_image') }}">@icon('image')</button>
18 <button class="text-button" type="button" data-action="insertLink" title="{{ trans('entities.pages_md_insert_link') }}">@icon('link')</button>
19 <button class="text-button" type="button" data-action="fullscreen" title="{{ trans('common.fullscreen') }}">@icon('fullscreen')</button>
23 <div markdown-input class="flex flex-fill">
24 <textarea id="markdown-editor-input"
25 refs="markdown-editor@input"
26 @if($errors->has('markdown')) class="text-neg" @endif
28 rows="5">@if(isset($model) || old('markdown')){{ old('markdown') ?? ($model->markdown === '' ? $model->html : $model->markdown) }}@endif</textarea>
33 <div class="markdown-editor-wrap">
34 <div class="editor-toolbar">
35 <div class="editor-toolbar-label text-mono px-m py-xs">{{ trans('entities.pages_md_preview') }}</div>
37 <iframe src="about:blank"
38 refs="markdown-editor@display"
39 class="markdown-display"
40 sandbox="allow-same-origin"></iframe>
46 @if($errors->has('markdown'))
47 <div class="text-neg text-small">{{ $errors->first('markdown') }}</div>