|
1 | 1 | <label for='text' class='form-label'>Text to display</label> |
2 | | -<textarea name='text' class='form-control'>{{$params->text ?? ''}} |
3 | | -</textarea> |
| 2 | +<textarea class="form-control @if(env('ALLOW_USER_HTML') === true) ckeditor @endif" name="text" rows="6">{{ $link_title ?? '' }}</textarea> |
| 3 | +@if(env('ALLOW_USER_HTML') === true) |
| 4 | +<script src="{{ asset('studio/external-dependencies/ckeditor.js') }}"></script> |
| 5 | +<script> |
| 6 | + ClassicEditor |
| 7 | + .create(document.querySelector('.ckeditor'), { |
| 8 | +
|
| 9 | + toolbar: { |
| 10 | + items: [ |
| 11 | + 'exportPDF', 'exportWord', '|' |
| 12 | + , 'findAndReplace', 'selectAll', '|' |
| 13 | + , 'heading', '|' |
| 14 | + , 'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript', 'removeFormat', '|' |
| 15 | + , 'bulletedList', 'numberedList', 'todoList', '|' |
| 16 | + , 'outdent', 'indent', '|' |
| 17 | + , 'undo', 'redo' |
| 18 | +
|
| 19 | + , 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'highlight', '|' |
| 20 | + , 'alignment', '|' |
| 21 | + , 'link', 'blockQuote', '|' |
| 22 | + , 'specialCharacters', 'horizontalLine', '|' |
| 23 | + , 'textPartLanguage', '|' |
| 24 | + ] |
| 25 | + , shouldNotGroupWhenFull: true |
| 26 | + } |
| 27 | + , fontFamily: { |
| 28 | + options: [ |
| 29 | + 'default' |
| 30 | + , 'Arial, Helvetica, sans-serif' |
| 31 | + , 'Courier New, Courier, monospace' |
| 32 | + , 'Georgia, serif' |
| 33 | + , 'Lucida Sans Unicode, Lucida Grande, sans-serif' |
| 34 | + , 'Tahoma, Geneva, sans-serif' |
| 35 | + , 'Times New Roman, Times, serif' |
| 36 | + , 'Trebuchet MS, Helvetica, sans-serif' |
| 37 | + , 'Verdana, Geneva, sans-serif' |
| 38 | + ] |
| 39 | + , supportAllValues: true |
| 40 | + }, |
| 41 | + fontSize: { |
| 42 | + options: [ 10, 12, 14, 'default', 18, 20, 22 ], |
| 43 | + supportAllValues: true |
| 44 | + }, |
| 45 | +
|
| 46 | + }) |
| 47 | + .catch(error => { |
| 48 | + console.error(error); |
| 49 | + }); |
| 50 | +
|
| 51 | +</script> |
| 52 | + |
| 53 | +@endif |
0 commit comments