Skip to content

Commit

Permalink
Fix for table controls in detached editor
Browse files Browse the repository at this point in the history
  • Loading branch information
maurofmferrao committed Nov 28, 2024
1 parent 8d70014 commit b1fb5fa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
9 changes: 9 additions & 0 deletions ui/src/helpers/form-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,15 @@ const formHelpers = function() {
});
}

// If we have a detached editor, we need to add a property
// to the main bar to help with CSS styling
$(
'.ck-editor-body-detached .ck-body-wrapper ' +
'.ck-balloon-panel > .ck-toolbar',
).each((_idx, el) => {
$(el).parent().attr('data-main-toolbar', 1);
});

return false;
});
});
Expand Down
21 changes: 19 additions & 2 deletions ui/src/style/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,28 @@
z-index: calc($properties-panel-rich-text-container-z-index + 1) !important;
}

.ck-editor-body-detached .ck-body-wrapper .ck-balloon-panel.ck-toolbar-container.ck-balloon-panel_toolbar_east {
.ck-editor-body-detached .ck-body-wrapper .ck-balloon-panel[data-main-toolbar] {
right: 150px !important;
left: auto !important;
top: 66px ! important;
top: auto !important;
bottom: calc(100vh - 100px) !important;
width: calc(100vw - 300px) !important;
display: block;
overflow: auto;
}

.ck-editor-body-detached .ck-body-wrapper .ck-balloon-panel:not(.ck-powered-by-balloon):not([data-main-toolbar]) {
top: 148px !important;
left: 160px !important;
opacity: 0.95;
}

.ck-editor-body-detached .ck-body-wrapper .ck-balloon-panel.ck-powered-by-balloon {
top: auto !important;
left: auto !important;
bottom: 16px !important;
right: 16px !important;
display: block;
}

.rich-text-main-container {
Expand Down

0 comments on commit b1fb5fa

Please sign in to comment.