@extends('layouts.idara.panel')


@section('content')


@include('backend.partials.import')

@include('backend.partials.features')
    <div class="card mt-4">
        <div class="card-header">
            Vous pouvez ajouter Détails 
        </div>
        <div class="card-body">
            

            <div class="container">
                @if(session('success'))
                <div class="alert alert-success">
                    {{ session('success') }}
                </div>
                @endif
                @if (count($errors) > 0)
                <div class="alert alert-danger">
                    <strong>Whoops!</strong> Some problems with your input.<br><br>
                    <ul>
                        @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
                @endif

                <form method="post" action="{{url('presentationsDetails/'.$article->id)}}" enctype="multipart/form-data">
                    <input type="hidden" name="_method" value="PUT">

                    @csrf
                    <div class="row">
                    <div class="form-group mt-4">
                        <label for="exampleFormControlTextarea1"><strong>Détails :</strong></label>
                        <textarea class="form-control" id="presentation" name="details" rows="6"></textarea>
                    </div>

                    </div>
                    <div class="row">
                       
                        <div class="form-group col-md-4 mt-4">
                            <button type="submit" class="btn btn-primary ">Ajouter</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>

</div>


<style>
    .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
        border-color: var(--ck-color-base-border);
        height: 300px;
    }

</style>
<script src="https://cdn.ckeditor.com/ckeditor5/36.0.0/classic/ckeditor.js"></script>
<script>
    ClassicEditor
        .create(document.querySelector('#presentation'))
        .then(editor => {
            window.editor = editor;
        })
        .catch(error => {
            console.error('There was a problem initializing the editor.', error);
        });

</script>

@endsection
