39 lines
1.3 KiB
PHP
39 lines
1.3 KiB
PHP
<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",
|
|
@can('upload', \App\Models\FileManager\File::class)
|
|
filebrowserUploadUrl: '{{route('upload.postFile', ['_token' => csrf_token()])}}',
|
|
@endcan
|
|
forcePasteAsPlainText: true,
|
|
entities: false,
|
|
basicEntities: false,
|
|
entities_greek: false,
|
|
entities_latin: false,
|
|
height: {{$height or 550}},
|
|
removePlugins: 'about,scayt', //elementspath
|
|
extraPlugins: 'justify',
|
|
enterMode: CKEDITOR.ENTER_P,
|
|
toolbarGroups: [
|
|
{name: 'undo', groups: ['undo']},
|
|
{name: 'styles'},
|
|
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
|
|
{name: 'paragraph', groups: ['list', 'indent', 'align', 'blocks']},
|
|
{name: 'links'},
|
|
{name: 'editing', groups: ['find', 'selection']},
|
|
{name: 'insert'},
|
|
{name: 'forms'},
|
|
{name: 'document', groups: ['mode', 'document', 'doctools']},
|
|
{name: 'tools'}
|
|
]
|
|
});
|
|
</script> |