FIX #2056: areYouSure now reacts also on changes in CKEditor
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" enctype="multipart/form-data" action="{{route('content.newPost', ['moduleId' => $module->id])}}">
|
||||
<form method="POST" enctype="multipart/form-data" action="{{route('content.newPost', ['module' => $module])}}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
@include('admin.content.formInputs')
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
<script src="{{asset('/resources/assets/js/vendor/ckeditor/ckeditor.js')}}"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
CKEDITOR.on('instanceCreated', function(e) {
|
||||
e.editor.on('change', function(event) {
|
||||
var textarea = event.editor.element.$;
|
||||
$(textarea).val(event.editor.getData().trim());
|
||||
$(textarea.form).trigger('checkform.areYouSure');
|
||||
});
|
||||
})
|
||||
|
||||
CKEDITOR.replace ('{{$textareaId}}', {
|
||||
uiColor: "#F5F5F5",
|
||||
filebrowserUploadUrl: '{{route('upload.postFile', ['_token' => csrf_token()])}}',
|
||||
|
||||
Reference in New Issue
Block a user