Page Editing with TinyMCE
This commit is contained in:
parent
daf092373c
commit
cb07013fde
5 changed files with 21 additions and 26 deletions
|
|
@ -14,7 +14,9 @@
|
|||
<!-- class="fas fa-plus">--> <!-- Font Awesome Demo-->
|
||||
|
||||
|
||||
<h5>{!! $content !!}</h5>
|
||||
<div style="width:100%; height:100vh;font-family:Nunito;font-size: 1.2rem;">
|
||||
{!! $content !!}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,10 +13,11 @@
|
|||
@csrf
|
||||
|
||||
<div class="form-group" style="display:flex;">
|
||||
<textarea class="col-10" name="pagecontent" rows="20" cols="50">{{ $content }}
|
||||
<textarea style="width:100%; height:100vh;" name="pagecontent" id="mytextarea">
|
||||
{!! $content !!}
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
@if(Auth::user()->role=="ADMIN")
|
||||
<button type="submit" class="btn btn-danger col-2 mb-2 float-right mr-2">Hochladen</button>
|
||||
@endif
|
||||
|
|
@ -29,4 +30,16 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Taken from https://www.tiny.cloud/docs/quick-start/ -->
|
||||
<!-- Nag-free version: https://medium.com/@petehouston/remove-tinymce-warning-notification-on-cloud-api-key-70a4a352b8b0 -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.2/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: '#mytextarea'
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -49,19 +49,5 @@
|
|||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function updateAndSubmit() {
|
||||
var htmlString = JSON.stringify($('.richText-editor').html());
|
||||
alert(htmlString);
|
||||
/*
|
||||
let suneditor=document.getElementById("sample").suneditor;
|
||||
console.log("updateAndSubmit");
|
||||
let ta=document.getElementById("sample");
|
||||
ta.value=suneditor.getContents();
|
||||
console.log(suneditor.getContents());
|
||||
|
||||
*/
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -18,14 +18,8 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
<!--
|
||||
<span>
|
||||
<h4>\{\!! $content !!}</h4>
|
||||
</span>
|
||||
-->
|
||||
|
||||
<div style="width:100%; height:100vh;" id="sample">
|
||||
{{ $content }}
|
||||
<div style="width:100%; height:100vh;font-family:Nunito;font-size: 1.2rem;" id="sample">
|
||||
{!! $content !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
|
||||
|
||||
<a class="dropdown-item" href="/admin/edit_home">Seite: Startseite bearbeiten</a>
|
||||
<a class="dropdown-item" href="/admin/edit_activities">Seite: Stammtisch bearbeiten</a>
|
||||
<a class="dropdown-item" href="/admin/edit_activities">Seite: Aktivitäten bearbeiten</a>
|
||||
<a class="dropdown-item" href="/admin/upload_tourplan">Tourenplan(pdf) hochladen</a>
|
||||
<a class="dropdown-item" href="/admin/upload_mitgliedsantrag">Mitgliedsantrag(pdf) hochladen</a>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue