]> BookStack Code Mirror - bookstack/blob - resources/views/pages/markdown-editor.blade.php
Add footer element, styles, and associated settings
[bookstack] / resources / views / pages / markdown-editor.blade.php
1 <div v-pre id="markdown-editor" markdown-editor class="flex-fill flex code-fill">
2     @exposeTranslations([
3         'errors.image_upload_error',
4     ])
5
6     <div class="markdown-editor-wrap active">
7         <div class="editor-toolbar">
8             <span class="float left editor-toolbar-label">{{ trans('entities.pages_md_editor') }}</span>
9             <div class="float right buttons">
10                 @if(config('services.drawio'))
11                     <button class="text-button" type="button" data-action="insertDrawing">@icon('drawing'){{ trans('entities.pages_md_insert_drawing') }}</button>
12                     <span class="mx-xs text-muted">|</span>
13                 @endif
14                 <button class="text-button" type="button" data-action="insertImage">@icon('image'){{ trans('entities.pages_md_insert_image') }}</button>
15                 <span class="mx-xs text-muted">|</span>
16                 <button class="text-button" type="button" data-action="insertLink">@icon('link'){{ trans('entities.pages_md_insert_link') }}</button>
17                 <span class="mx-xs text-muted">|</span>
18                 <button class="text-button" type="button" data-action="fullscreen">@icon('fullscreen'){{ trans('common.fullscreen') }}</button>
19             </div>
20         </div>
21
22         <div markdown-input class="flex flex-fill">
23             <textarea id="markdown-editor-input"
24                       @if($errors->has('markdown')) class="text-neg" @endif
25                       name="markdown"
26                       rows="5">@if(isset($model) || old('markdown')){{ old('markdown') ?? ($model->markdown === '' ? $model->html : $model->markdown) }}@endif</textarea>
27         </div>
28
29     </div>
30
31     <div class="markdown-editor-wrap">
32         <div class="editor-toolbar">
33             <div class="editor-toolbar-label">{{ trans('entities.pages_md_preview') }}</div>
34         </div>
35         <iframe srcdoc="" class="markdown-display" sandbox="allow-same-origin"></iframe>
36     </div>
37     <input type="hidden" name="html"/>
38
39 </div>
40
41
42
43 @if($errors->has('markdown'))
44     <div class="text-neg text-small">{{ $errors->first('markdown') }}</div>
45 @endif