61 lines
2.3 KiB
PHP
61 lines
2.3 KiB
PHP
<div class="forms-group">
|
|
<div class="form-group">
|
|
<label for="title">{{ __('Titre') }} *</label>
|
|
<input type="text" id="title" name="title" class="form-control" placeholder="{{ __('Titre') }} *" value="{{ old('title', $text->title ?? '') }}" required>
|
|
@include('back.modules.input-error', ['inputName'=>'title'])
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="text">{{ __('Texte') }} *</label>
|
|
<textarea class="form-control" placeholder="{{ __('Texte') }}" id="text" name="text" style="height: 150px;" required>{{ old('commentaire', $text->text ?? '') }}</textarea>
|
|
@include('back.modules.input-error', ['inputName'=>'text'])
|
|
</div>
|
|
</div>
|
|
|
|
@push('scripts')
|
|
<script type="text/javascript">
|
|
var editorConfig = {
|
|
removePlugins: ["Image", "ImageCaption", "ImageStyle", "ImageToolbar", "ImageUpload"],
|
|
toolbar: ['heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', '|', 'blockQuote', 'insertTable', '|', 'undo', 'redo'],
|
|
heading: {
|
|
options: [{
|
|
model: 'paragraph',
|
|
title: 'Paragraph',
|
|
class: 'ck-heading_paragraph'
|
|
},
|
|
{
|
|
model: 'heading1',
|
|
view: 'h1',
|
|
title: 'Heading 1',
|
|
class: 'ck-heading_heading1'
|
|
},
|
|
{
|
|
model: 'heading2',
|
|
view: 'h2',
|
|
title: 'Heading 2',
|
|
class: 'ck-heading_heading2'
|
|
},
|
|
{
|
|
model: 'heading3',
|
|
view: 'h3',
|
|
title: 'Heading 3',
|
|
class: 'ck-heading_heading3'
|
|
},
|
|
{
|
|
model: 'heading4',
|
|
view: 'h4',
|
|
title: 'Heading 4',
|
|
class: 'ck-heading_heading4'
|
|
}
|
|
]
|
|
},
|
|
table: {
|
|
contentToolbar: ['tableColumn', 'tableRow', 'mergeTableCells']
|
|
}
|
|
};
|
|
ClassicEditor
|
|
.create(document.querySelector('#text'), editorConfig)
|
|
.catch(error => {
|
|
console.error(error);
|
|
});
|
|
</script>
|
|
@endpush
|