v0.5.16 - Fixed Cookie Problem on controllers. Added quill editor on event. Added message in msg.php en/dk
This commit is contained in:
@@ -17,17 +17,8 @@
|
||||
.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>
|
||||
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
|
||||
<h1>Opret Aktivitet:</h1>
|
||||
<form method="post" action="{{ route("events.store") }}">
|
||||
@csrf
|
||||
@@ -36,7 +27,8 @@
|
||||
<label for="accountable">Event Ansvarlig:</label>
|
||||
<input type="text" name="accountable" id="accountable" required>
|
||||
<label for="description">Event Beskrivelse:</label>
|
||||
<textarea name="description" id="editor"></textarea>
|
||||
<div id="editor"></div>
|
||||
<textarea name="description" class="d-none" id="hiddenArea"></textarea>
|
||||
<label for="date">Event dato:</label>
|
||||
<input type="datetime-local" name="date" id="date" required>
|
||||
<label class="toggle">
|
||||
@@ -47,15 +39,31 @@
|
||||
</label>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
|
||||
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: 'textarea',
|
||||
setup: function (editor) {
|
||||
editor.on('change', function () {
|
||||
tinymce.triggerSave();
|
||||
});
|
||||
}
|
||||
var container = document.getElementById("editor");
|
||||
var fullEditor = new Quill(container, {
|
||||
modules: {
|
||||
'toolbar': [
|
||||
[ 'bold', 'italic', 'underline', 'strike' ],
|
||||
[{ 'color': [] }, { 'background': [] }],
|
||||
[{ 'script': 'super' }, { 'script': 'sub' }],
|
||||
[{ 'header': '1' }, { 'header': '2' }, 'blockquote', 'code-block' ],
|
||||
[{ 'list': 'ordered' }, { 'list': 'bullet'}, { 'indent': '-1' }, { 'indent': '+1' }],
|
||||
[ {'direction': 'rtl'}, { 'align': [] }],
|
||||
[ 'link', 'image', 'video', 'formula' ],
|
||||
[ 'clean' ]
|
||||
],
|
||||
},
|
||||
theme: 'snow'
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
var form = document.querySelector('form');
|
||||
form.onsubmit = function() {
|
||||
var myEditor = document.getElementById('editor');
|
||||
var html = myEditor.children[0].innerHTML;
|
||||
document.getElementById('hiddenArea').innerText = html;
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user