mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-28 13:12:05 +00:00
![Dan Brown](/assets/img/avatar_default.png)
Extracted page editor view data gathering to its own class for alignment. Updated the data used in views as part of the process to use view-specific variables instead of custom attributes added to models. Also moved tinymce library loading so it's not loaded when not using the wysiwyg editor.
21 lines
954 B
PHP
21 lines
954 B
PHP
@push('head')
|
|
<script src="{{ url('/libs/tinymce/tinymce.min.js?ver=5.10.2') }}" nonce="{{ $cspNonce }}"></script>
|
|
@endpush
|
|
|
|
<div component="wysiwyg-editor"
|
|
option:wysiwyg-editor:language="{{ config('app.lang') }}"
|
|
option:wysiwyg-editor:page-id="{{ $model->id ?? 0 }}"
|
|
option:wysiwyg-editor:text-direction="{{ config('app.rtl') ? 'rtl' : 'ltr' }}"
|
|
option:wysiwyg-editor:image-upload-error-text="{{ trans('errors.image_upload_error') }}"
|
|
option:wysiwyg-editor:server-upload-limit-text="{{ trans('errors.server_upload_limit') }}"
|
|
class="flex-fill flex">
|
|
|
|
<textarea id="html-editor" name="html" rows="5"
|
|
@if($errors->has('html')) class="text-neg" @endif>@if(isset($model) || old('html')){{ old('html') ? old('html') : $model->html }}@endif</textarea>
|
|
</div>
|
|
|
|
@if($errors->has('html'))
|
|
<div class="text-neg text-small">{{ $errors->first('html') }}</div>
|
|
@endif
|
|
|
|
@include('pages.parts.editor-translations') |