| 
									
										
										
										
											2020-07-06 04:18:17 +08:00
										 |  |  | <div id="markdown-editor" component="markdown-editor" | 
					
						
							|  |  |  |      option:markdown-editor:page-id="{{ $model->id ?? 0 }}" | 
					
						
							|  |  |  |      option:markdown-editor:text-direction="{{ config('app.rtl') ? 'rtl' : 'ltr' }}" | 
					
						
							| 
									
										
										
										
											2020-11-22 01:52:49 +08:00
										 |  |  |      option:markdown-editor:image-upload-error-text="{{ trans('errors.image_upload_error') }}" | 
					
						
							| 
									
										
										
										
											2021-05-27 01:23:27 +08:00
										 |  |  |      option:markdown-editor:server-upload-limit-text="{{ trans('errors.server_upload_limit') }}" | 
					
						
							| 
									
										
										
										
											2020-07-06 04:18:17 +08:00
										 |  |  |      class="flex-fill flex code-fill"> | 
					
						
							| 
									
										
										
										
											2019-07-06 21:52:25 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-28 22:08:20 +08:00
										 |  |  |     <div class="markdown-editor-wrap active flex-container-column"> | 
					
						
							| 
									
										
										
										
											2022-11-28 03:52:10 +08:00
										 |  |  |         <div class="editor-toolbar flex-container-row items-stretch justify-space-between"> | 
					
						
							|  |  |  |             <div class="editor-toolbar-label text-mono px-m py-xs flex-container-row items-center flex"> | 
					
						
							|  |  |  |                 <span>{{ trans('entities.pages_md_editor') }}</span> | 
					
						
							|  |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2022-11-28 04:30:14 +08:00
										 |  |  |             <div component="dropdown" class="buttons flex-container-row items-stretch"> | 
					
						
							| 
									
										
										
										
											2019-07-06 21:52:25 +08:00
										 |  |  |                 @if(config('services.drawio')) | 
					
						
							| 
									
										
										
										
											2022-11-28 03:52:10 +08:00
										 |  |  |                     <button class="text-button" type="button" data-action="insertDrawing" title="{{ trans('entities.pages_md_insert_drawing') }}">@icon('drawing')</button> | 
					
						
							| 
									
										
										
										
											2019-07-06 21:52:25 +08:00
										 |  |  |                 @endif | 
					
						
							| 
									
										
										
										
											2022-11-28 03:52:10 +08:00
										 |  |  |                 <button class="text-button" type="button" data-action="insertImage" title="{{ trans('entities.pages_md_insert_image') }}">@icon('image')</button> | 
					
						
							|  |  |  |                 <button class="text-button" type="button" data-action="insertLink" title="{{ trans('entities.pages_md_insert_link') }}">@icon('link')</button> | 
					
						
							|  |  |  |                 <button class="text-button" type="button" data-action="fullscreen" title="{{ trans('common.fullscreen') }}">@icon('fullscreen')</button> | 
					
						
							| 
									
										
										
										
											2022-11-28 04:30:14 +08:00
										 |  |  |                 <button refs="dropdown@toggle" class="text-button" type="button" title="{{ trans('common.more') }}">@icon('more')</button> | 
					
						
							|  |  |  |                 <div refs="dropdown@menu markdown-editor@setting-container" class="dropdown-menu" role="menu"> | 
					
						
							|  |  |  |                     <div class="px-m"> | 
					
						
							| 
									
										
										
										
											2022-11-28 22:08:20 +08:00
										 |  |  |                         @include('form.custom-checkbox', ['name' => 'md-showPreview', 'label' => trans('entities.pages_md_show_preview'), 'value' => true, 'checked' => true]) | 
					
						
							| 
									
										
										
										
											2022-11-28 04:30:14 +08:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                     <hr class="m-none"> | 
					
						
							|  |  |  |                     <div class="px-m"> | 
					
						
							| 
									
										
										
										
											2022-11-28 22:08:20 +08:00
										 |  |  |                         @include('form.custom-checkbox', ['name' => 'md-scrollSync', 'label' => trans('entities.pages_md_sync_scroll'), 'value' => true, 'checked' => true]) | 
					
						
							| 
									
										
										
										
											2022-11-28 04:30:14 +08:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2019-07-06 21:52:25 +08:00
										 |  |  |             </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-14 21:08:40 +08:00
										 |  |  |         <div class="flex flex-fill" dir="ltr"> | 
					
						
							| 
									
										
										
										
											2019-12-22 22:21:18 +08:00
										 |  |  |             <textarea id="markdown-editor-input" | 
					
						
							| 
									
										
										
										
											2022-11-27 00:43:28 +08:00
										 |  |  |                       refs="markdown-editor@input" | 
					
						
							| 
									
										
										
										
											2019-12-22 22:21:18 +08:00
										 |  |  |                       @if($errors->has('markdown')) class="text-neg" @endif | 
					
						
							|  |  |  |                       name="markdown" | 
					
						
							|  |  |  |                       rows="5">@if(isset($model) || old('markdown')){{ old('markdown') ?? ($model->markdown === '' ? $model->html : $model->markdown) }}@endif</textarea> | 
					
						
							| 
									
										
										
										
											2019-07-06 21:52:25 +08:00
										 |  |  |         </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-28 22:08:20 +08:00
										 |  |  |     <div refs="markdown-editor@display-wrap" class="markdown-editor-wrap flex-container-row items-stretch" style="display: none"> | 
					
						
							|  |  |  |         <div refs="markdown-editor@divider" class="markdown-panel-divider flex-fill"></div> | 
					
						
							|  |  |  |         <div class="flex-container-column flex flex-fill"> | 
					
						
							|  |  |  |             <div class="editor-toolbar"> | 
					
						
							|  |  |  |                 <div class="editor-toolbar-label text-mono px-m py-xs">{{ trans('entities.pages_md_preview') }}</div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |             <iframe src="about:blank" | 
					
						
							|  |  |  |                     refs="markdown-editor@display" | 
					
						
							|  |  |  |                     class="markdown-display flex flex-fill" | 
					
						
							|  |  |  |                     sandbox="allow-same-origin"></iframe> | 
					
						
							| 
									
										
										
										
											2019-07-06 21:52:25 +08:00
										 |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @if($errors->has('markdown')) | 
					
						
							|  |  |  |     <div class="text-neg text-small">{{ $errors->first('markdown') }}</div> | 
					
						
							|  |  |  | @endif |