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

42 lines
1.1 KiB
PHP
Raw Normal View History

2020-08-06 10:21:19 +00:00
@extends("admin.layout.base")
@extends("admin.layout.header")
@section("title")
Opret Nyheder
@endsection
@section("path")
<a href="{{ route('news.create') }}" class="text-white">Opret Nyheder</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 Nyhed</h1>
<form method="post" action="{{ route("news.store") }}">
@csrf
<label for="title">Titel nyheden:</label>
<input type="text" name="name" id="title" placeholder="OBS: Menuplanen er ændret" required>
<textarea name="content" id="editor"></textarea>
<input type="submit" class="btn btn-dark text-white" value="Opret">
</form>
<script>
ClassicEditor
.create( document.querySelector( '#editor' ) )
.then( editor => {
console.log( editor );
} )
.catch( error => {
console.error( error );
} );
</script>
@endsection