|
266 | 266 | @if(env('ALLOW_USER_HTML') === true)
|
267 | 267 | <script src="{{ asset('assets/external-dependencies/ckeditor.js') }}"></script>
|
268 | 268 | <script>
|
269 |
| - ClassicEditor |
270 |
| - .create(document.querySelector('.ckeditor'), { |
271 |
| - |
272 |
| - toolbar: { |
273 |
| - items: [ |
274 |
| - 'exportPDF', 'exportWord', '|' |
275 |
| - , 'findAndReplace', 'selectAll', '|' |
276 |
| - , 'heading', '|' |
277 |
| - , 'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript', 'removeFormat', '|' |
278 |
| - , 'bulletedList', 'numberedList', 'todoList', '|' |
279 |
| - , 'outdent', 'indent', '|' |
280 |
| - , 'undo', 'redo' |
281 |
| - |
282 |
| - , 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'highlight', '|' |
283 |
| - , 'alignment', '|' |
284 |
| - , 'link', 'blockQuote', '|' |
285 |
| - , 'specialCharacters', 'horizontalLine', '|' |
286 |
| - , 'textPartLanguage', '|' |
287 |
| - ] |
288 |
| - , shouldNotGroupWhenFull: true |
289 |
| - } |
290 |
| - , fontFamily: { |
291 |
| - options: [ |
292 |
| - 'default' |
293 |
| - , 'Arial, Helvetica, sans-serif' |
294 |
| - , 'Courier New, Courier, monospace' |
295 |
| - , 'Georgia, serif' |
296 |
| - , 'Lucida Sans Unicode, Lucida Grande, sans-serif' |
297 |
| - , 'Tahoma, Geneva, sans-serif' |
298 |
| - , 'Times New Roman, Times, serif' |
299 |
| - , 'Trebuchet MS, Helvetica, sans-serif' |
300 |
| - , 'Verdana, Geneva, sans-serif' |
301 |
| - ] |
302 |
| - , supportAllValues: true |
303 |
| - }, |
304 |
| - fontSize: { |
305 |
| - options: [ 10, 12, 14, 'default', 18, 20, 22 ], |
306 |
| - supportAllValues: true |
307 |
| - }, |
308 |
| - |
309 |
| - }) |
310 |
| - .catch(error => { |
311 |
| - console.error(error); |
312 |
| - }); |
313 |
| - |
314 |
| - </script> |
| 269 | + ClassicEditor |
| 270 | + .create(document.querySelector('.ckeditor'), { |
| 271 | + toolbar: { |
| 272 | + items: [ |
| 273 | + 'exportPDF', 'exportWord', '|', |
| 274 | + 'findAndReplace', 'selectAll', '|', |
| 275 | + 'heading', '|', |
| 276 | + 'bold', 'italic', 'strikethrough', 'underline', 'code', 'subscript', 'superscript', 'removeFormat', '|', |
| 277 | + 'bulletedList', 'numberedList', 'todoList', '|', |
| 278 | + 'outdent', 'indent', '|', |
| 279 | + 'undo', 'redo', |
| 280 | + 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor', 'highlight', '|', |
| 281 | + 'alignment', '|', |
| 282 | + 'link', 'blockQuote', '|', |
| 283 | + 'specialCharacters', 'horizontalLine', '|', |
| 284 | + 'textPartLanguage', '|', |
| 285 | + ], |
| 286 | + shouldNotGroupWhenFull: true |
| 287 | + }, |
| 288 | + fontFamily: { |
| 289 | + options: [ |
| 290 | + 'default', |
| 291 | + 'Arial, Helvetica, sans-serif', |
| 292 | + 'Courier New, Courier, monospace', |
| 293 | + 'Georgia, serif', |
| 294 | + 'Lucida Sans Unicode, Lucida Grande, sans-serif', |
| 295 | + 'Tahoma, Geneva, sans-serif', |
| 296 | + 'Times New Roman, Times, serif', |
| 297 | + 'Trebuchet MS, Helvetica, sans-serif', |
| 298 | + 'Verdana, Geneva, sans-serif' |
| 299 | + ], |
| 300 | + supportAllValues: true |
| 301 | + }, |
| 302 | + fontSize: { |
| 303 | + options: [10, 12, 14, 'default', 18, 20, 22], |
| 304 | + supportAllValues: true |
| 305 | + }, |
| 306 | + link: { |
| 307 | + addTargetToExternalLinks: true, // Add this option to open external links in a new tab |
| 308 | + defaultProtocol: 'http://', |
| 309 | + decorators: { |
| 310 | + addTargetToExternalLinks: { |
| 311 | + mode: 'manual', |
| 312 | + label: 'Open in new tab', |
| 313 | + attributes: { |
| 314 | + target: '_blank', |
| 315 | + rel: 'noopener noreferrer' |
| 316 | + } |
| 317 | + } |
| 318 | + } |
| 319 | + } |
| 320 | + }) |
| 321 | + .catch(error => { |
| 322 | + console.error(error); |
| 323 | + }); |
| 324 | + </script> |
315 | 325 |
|
316 | 326 | @endif
|
317 | 327 | </div>
|
|
0 commit comments