2020-08-04 11:21:23 +00:00
|
|
|
@extends("admin.layout.base")
|
|
|
|
@extends("admin.layout.header")
|
|
|
|
|
|
|
|
@section("title")
|
|
|
|
Vejledning - Rediger
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section("path")
|
|
|
|
<a href="{{route('guides.edit', ['guide' => $guide])}}" class="text-white">Rediger 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>Rediger vejledning:</h1>
|
|
|
|
<form method="post" action="{{route("guides.update", ["guide" => $guide])}}">
|
|
|
|
@csrf
|
|
|
|
@method("PUT")
|
|
|
|
<label for="title">Navn</label>
|
|
|
|
<input value="{{$guide->name}}" type="text" name="name" id="title" required>
|
|
|
|
<label for="editor">Vejledning</label>
|
2020-08-05 07:23:57 +00:00
|
|
|
<textarea name="guide_articles" id="editor">{{$guide->guide_articles}}</textarea>
|
2020-08-04 11:21:23 +00:00
|
|
|
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
|
|
|
</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' },
|
2020-08-06 12:47:22 +00:00
|
|
|
{ model: 'heading2', view: 'h4', title: 'Heading 2', class: 'sde-blue' },
|
2020-08-04 11:21:23 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} )
|
|
|
|
.catch( error => {
|
|
|
|
console.log( error );
|
|
|
|
} );
|
|
|
|
</script>
|
|
|
|
@endsection
|