Changes for page EditSheet

Last modified by teamwire004 on 2025/07/01 06:50

From version 8.1
edited by teamwire004
on 2025/07/01 06:50
Change comment: Install extension [org.xwiki.platform:xwiki-platform-ckeditor-ui/16.10.9]
To version 4.1
edited by teamwire004
on 2024/07/12 13:08
Change comment: Install extension [org.xwiki.platform:xwiki-platform-ckeditor-ui/15.10.10]

Summary

Details

XWiki.JavaScriptExtension[0]
Code
... ... @@ -54,11 +54,9 @@
54 54   }
55 55  
56 56   var uploadDisabled = element.hasAttribute('data-upload-disabled');
57 - var startupFocus = element.hasAttribute('data-startup-focus');
58 58  
59 59   var config = {
60 60   filebrowserUploadUrl: uploadDisabled ? '' : getUploadURL(sourceDocument, 'filebrowser'),
61 - startupFocus,
62 62   height: $(element).height(),
63 63   // Used to resolve and serialize relative references. Also used to make HTTP requests with the right context.
64 64   sourceDocument: sourceDocument,
XWiki.JavaScriptExtension[2]
Code
... ... @@ -10,9 +10,7 @@
10 10   container.find('.ckeditor-textarea').each(function() {
11 11   // Wrap in try/catch so that a failure to load one editor doesn't affect the other editors.
12 12   try {
13 - createEditor(ckeditor, this).then(() => {
14 - this.classList.remove('loading');
15 - });
13 + createEditor(ckeditor, this);
16 16   } catch(e) {
17 17   console.log(e);
18 18   }
XWiki.StyleSheetExtension[0]
Code
... ... @@ -12,13 +12,6 @@
12 12   resize: none;
13 13  }
14 14  
15 -/* Hide the form action bar while the editor is loading in order to avoid UI flickering (because the editor may enhance
16 - or replace the form action bar). */
17 -main > div:has(.ckeditor-textarea.loading) ~ .bottom-editor,
18 -#xwikicontent.loading ~ form#inplace-editing {
19 - visibility: hidden;
20 -}
21 -
22 22  /* Show the modal above the CKEditor dialogs */
23 23  body > .modal-backdrop {
24 24   z-index: 10040;
... ... @@ -395,77 +395,6 @@
395 395  }
396 396  
397 397  /**
398 - * Custom styles to match XWiki's Look & Feel
399 - */
400 -.cke_chrome,
401 -.cke_chrome > .cke_inner {
402 - border-radius: @border-radius-base;
403 -}
404 -
405 -.cke_chrome > .cke_inner > .cke_top {
406 - border-top-right-radius: @border-radius-base;
407 - border-top-left-radius: @border-radius-base;
408 -}
409 -
410 -.cke_chrome > .cke_inner > .cke_bottom {
411 - border-bottom-right-radius: @border-radius-base;
412 - border-bottom-left-radius: @border-radius-base;
413 -}
414 -
415 -/* The standalone WYSIWYG edit mode shows the form action toolbar right below the CKEditor instance used to edit the
416 - document content. We make the bottom border rounded on the form action toolbar instead. */
417 -#xwikieditcontent > .cke_chrome,
418 -#xwikieditcontent > .cke_chrome > .cke_inner,
419 -#xwikieditcontent > .cke_chrome > .cke_inner > .cke_bottom {
420 - border-bottom-right-radius: 0;
421 - border-bottom-left-radius: 0;
422 -}
423 -
424 -a.cke_button,
425 -a.cke_combo_button {
426 - border-radius: @border-radius-small;
427 -}
428 -
429 -.cke_panel,
430 -.cke_dialog_body,
431 -.cke_dialog a.cke_dialog_ui_button,
432 -.cke_dialog input.cke_dialog_ui_input_text,
433 -.cke_dialog select.cke_dialog_ui_input_select,
434 -.cke_dialog fieldset.cke_dialog_ui_fieldset,
435 -.cke_notification {
436 - border-radius: @border-radius-base;
437 -}
438 -
439 -.cke_panel.cke_menu_panel,
440 -.cke_panel.cke_combopanel {
441 - margin: 2px 0;
442 -}
443 -
444 -.cke_dialog_title,
445 -.cke_dialog a.cke_dialog_tab {
446 - border-top-right-radius: @border-radius-base;
447 - border-top-left-radius: @border-radius-base;
448 -}
449 -
450 -.cke_dialog_contents,
451 -.cke_dialog_footer {
452 - border-bottom-right-radius: @border-radius-base;
453 - border-bottom-left-radius: @border-radius-base;
454 -}
455 -
456 -/**
457 - * Custom styles for the in-line editor
458 - */
459 -.viewbody > .cke_float {
460 - /* Shift the floating toolbar in order to match the content padding. */
461 - margin-right: floor((@grid-gutter-width / 2));
462 - margin-left: ceil((@grid-gutter-width / 2));
463 -}
464 -.cke_float .cke_top {
465 - border-radius: @border-radius-base;
466 -}
467 -
468 -/**
469 469   * Full-screen styles for the in-line editor
470 470   */
471 471  body[data-maximized="true"] {
... ... @@ -501,6 +501,12 @@
501 501   margin: 0 !important;
502 502   overflow-y: auto !important;
503 503   z-index: 9995;
426 +
427 + &:focus {
428 + /* Remove the focus border. */
429 + border-color: transparent !important;
430 + box-shadow: none !important;
431 + }
504 504   }
505 505   .cke_maximize_backdrop {
506 506   top: 0;
... ... @@ -520,37 +520,3 @@
520 520   z-index: 9995;
521 521   }
522 522  }
523 -
524 -/*
525 - * Override the CKEditor reset for the table border color.
526 - * The default border color from CKEditor is quite lacking on contrast.
527 - */
528 -.cke_editable.cke_show_borders table.cke_show_border,
529 -.cke_editable.cke_show_borders table.cke_show_border > tr > th,
530 -.cke_editable.cke_show_borders table.cke_show_border > tr > td,
531 -.cke_editable.cke_show_borders table.cke_show_border > thead > tr > th,
532 -.cke_editable.cke_show_borders table.cke_show_border > thead > tr > td,
533 -.cke_editable.cke_show_borders table.cke_show_border > tbody > tr > th,
534 -.cke_editable.cke_show_borders table.cke_show_border > tbody > tr > td,
535 -.cke_editable.cke_show_borders table.cke_show_border > tfoot > tr > th,
536 -.cke_editable.cke_show_borders table.cke_show_border > tfoot > tr > td {
537 - border-color: @table-border-color;
538 - border-style: solid;
539 -}
540 -
541 -/* CKEditor contains a CSS reset. It works with its own style sheets and does not use the ones in XWiki.
542 -However, we want `.sr-only` from XWiki to still be usable in our CKEditor environment.
543 -We need to redefine the XWiki styles of this class to have better priority than the CKEditor CSS reset.
544 -Without this, the elements with this class are still shown which would be different from the behaviour
545 -of `.sr-only` anywhere else in XWiki (as described in our doc).
546 -This redefinition allows for a more consistent behaviour of the `.sr-only` class. */
547 -.cke_reset_all .sr-only {
548 - position: absolute;
549 - width: 1px;
550 - height: 1px;
551 - padding: 0;
552 - margin: -1px;
553 - overflow: hidden;
554 - clip: rect(0, 0, 0, 0);
555 - border: 0;
556 -}