v0.5.11 - Changed CKEditor to TinyMCEditor / Removed Monday-Thursday in menu_plans and added a TinyMCEditor instead.
This commit is contained in:
@@ -17,21 +17,24 @@
|
||||
.toggle__text::before {
|
||||
border-color: black;
|
||||
}
|
||||
|
||||
.tox-notification {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.tox {
|
||||
border-radius: 4px !important;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.tiny.cloud/1/ikwmbvigw8ass90tn37xiql6mk1gjoks77t3m6tld60hdjov/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
<h1>Rediger Menuplan:</h1>
|
||||
<form method="post" action="{{ route("menu-plans.update", [ "menu_plan" => $menuplan ]) }}">
|
||||
@csrf
|
||||
@method("PUT")
|
||||
<label for="mandag">Uge:</label>
|
||||
<input type="number" name="week" id="week" min="1" max="53" value="{{ $menuplan->week }}" required>
|
||||
<label for="mandag">Mandag:</label>
|
||||
<input type="text" name="monday" id="mandag" value="{{ $menuplan->monday }}" required>
|
||||
<label for="tirsdag">Tirsdag:</label>
|
||||
<input type="text" name="tuesday" id="tirsdag" value="{{ $menuplan->tuesday }}" required>
|
||||
<label for="onsdag">Onsdag:</label>
|
||||
<input type="text" name="wednesday" id="onsdag" value="{{ $menuplan->wednesday }}" required>
|
||||
<label for="torsdag">Torsdag:</label>
|
||||
<input type="text" name="thursday" id="torsdag" value="{{ $menuplan->thursday }}" required>
|
||||
<textarea name="menu" id="editor">{!! $menuplan->menu !!}</textarea>
|
||||
<label class="toggle">
|
||||
<input class="toggle__input" type="checkbox" name="newsoption">
|
||||
<span class="toggle__label">
|
||||
@@ -40,4 +43,15 @@
|
||||
</label>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger Menuplan">
|
||||
</form>
|
||||
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: 'textarea',
|
||||
setup: function (editor) {
|
||||
editor.on('change', function () {
|
||||
tinymce.triggerSave();
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user