2019-07-06 09:52:25 -04:00
|
|
|
<div v-pre id="markdown-editor" markdown-editor class="flex-fill flex code-fill">
|
|
|
|
@exposeTranslations([
|
|
|
|
'errors.image_upload_error',
|
|
|
|
])
|
|
|
|
|
|
|
|
<div class="markdown-editor-wrap active">
|
|
|
|
<div class="editor-toolbar">
|
|
|
|
<span class="float left editor-toolbar-label">{{ trans('entities.pages_md_editor') }}</span>
|
|
|
|
<div class="float right buttons">
|
|
|
|
@if(config('services.drawio'))
|
|
|
|
<button class="text-button" type="button" data-action="insertDrawing">@icon('drawing'){{ trans('entities.pages_md_insert_drawing') }}</button>
|
|
|
|
| 
|
|
|
|
@endif
|
|
|
|
<button class="text-button" type="button" data-action="insertImage">@icon('image'){{ trans('entities.pages_md_insert_image') }}</button>
|
|
|
|
|
|
|
|
|
<button class="text-button" type="button" data-action="insertLink">@icon('link'){{ trans('entities.pages_md_insert_link') }}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div markdown-input class="flex flex-fill">
|
|
|
|
<textarea id="markdown-editor-input" name="markdown" rows="5"
|
2019-09-06 17:14:39 -04:00
|
|
|
@if($errors->has('markdown')) class="text-neg" @endif>@if(isset($model) || old('markdown')){{ old('markdown') ? old('markdown') : ($model->markdown === '' ? $model->html : $model->markdown) }}@endif</textarea>
|
2019-07-06 09:52:25 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="markdown-editor-wrap">
|
|
|
|
<div class="editor-toolbar">
|
|
|
|
<div class="editor-toolbar-label">{{ trans('entities.pages_md_preview') }}</div>
|
|
|
|
</div>
|
2019-09-01 05:51:52 -04:00
|
|
|
<iframe srcdoc="" class="markdown-display" sandbox="allow-same-origin"></iframe>
|
2019-07-06 09:52:25 -04:00
|
|
|
</div>
|
|
|
|
<input type="hidden" name="html"/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@if($errors->has('markdown'))
|
|
|
|
<div class="text-neg text-small">{{ $errors->first('markdown') }}</div>
|
|
|
|
@endif
|