Ekapp/skolehjem/resources/views/admin/guides/create.blade.php

49 lines
1.5 KiB
PHP
Raw Normal View History

@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Opret Vejledning
@endsection
@section("path")
<a href="{{ route('guides.create') }}" class="text-white">Opret Vejledning</a> /
@endsection
@section("content")
<style>
.ck-editor__main {
margin-bottom: 1rem;
}
</style>
<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/classic/ckeditor.js"></script>
<h1>Opret Vejledning</h1>
<form method="post" action="{{ route("guides.store") }}">
@csrf
<label for="title">Titel guiden</label>
<input type="text" name="name" id="title" required>
2020-08-04 11:37:06 +00:00
<textarea name="guide_articles" id="editor"></textarea>
<input type="submit" class="btn btn-dark text-white" value="Opret">
</form>
<script>
ClassicEditor
.create( document.querySelector( '#editor' ), {
toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ],
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h3', title: 'Heading 1', class: 'sde-blue' },
{ model: 'heading2', view: 'h4', title: 'Heading 2', class: 'sde-blue' }
]
}
} )
.catch( error => {
console.log( error );
} );
</script>
@endsection