diff --git a/client/web/compose/src/components/faIcons.js b/client/web/compose/src/components/faIcons.js index cc8172590..ef8bd2eac 100644 --- a/client/web/compose/src/components/faIcons.js +++ b/client/web/compose/src/components/faIcons.js @@ -65,6 +65,7 @@ import { faEllipsisV, faLocationArrow, faTools, + faTable, } from '@fortawesome/free-solid-svg-icons' import { @@ -178,4 +179,5 @@ library.add( faLocationArrow, faTools, faExclamationCircle, + faTable, ) diff --git a/client/web/compose/src/themes/corteza-base/custom.scss b/client/web/compose/src/themes/corteza-base/custom.scss index bb74ebe22..2eb501759 100644 --- a/client/web/compose/src/themes/corteza-base/custom.scss +++ b/client/web/compose/src/themes/corteza-base/custom.scss @@ -43,3 +43,70 @@ padding-bottom: 0px !important; } } + +/* Basic editor styles */ +.editor__content :first-child { + margin-top: 0; +} + +/* Table-specific styling */ +.editor__content table { + border-collapse: collapse; + margin: 0; + overflow: hidden; + table-layout: fixed; + width: 100%; +} + +.editor__content td, +.editor__content th { + border: 1px solid var(--gray); + box-sizing: border-box; + min-width: 1em; + padding: 6px 8px; + position: relative; + vertical-align: top; +} + +.editor__content td > *, +.editor__content th > * { + margin-bottom: 0; +} + +.editor__content th { + background-color: var(--gray-dark); + font-weight: bold; + text-align: left; +} + +.editor__content .selectedCell::after { + background: var(--gray-dark); + content: ""; + left: 0; + right: 0; + top: 0; + bottom: 0; + pointer-events: none; + position: absolute; + z-index: 2; +} + +.editor__content .column-resize-handle { + background-color: var(--purple); + bottom: -2px; + pointer-events: none; + position: absolute; + right: -2px; + top: 0; + width: 4px; +} + +.editor__content .tableWrapper { + margin: 1.5rem 0; + overflow-x: auto; +} + +.editor__content .resize-cursor { + cursor: ew-resize; + cursor: col-resize; +} diff --git a/lib/vue/src/components/input/CRichTextInput/RToolbar/TNode/base.vue b/lib/vue/src/components/input/CRichTextInput/RToolbar/TNode/base.vue index 52d0e24b6..85388c54b 100644 --- a/lib/vue/src/components/input/CRichTextInput/RToolbar/TNode/base.vue +++ b/lib/vue/src/components/input/CRichTextInput/RToolbar/TNode/base.vue @@ -75,6 +75,7 @@ export default { } }, ) + return rtr }, diff --git a/lib/vue/src/components/input/CRichTextInput/RToolbar/TNodeAttr/Alignment.vue b/lib/vue/src/components/input/CRichTextInput/RToolbar/TNodeAttr/Alignment.vue index 88a990b29..55ae56b0b 100644 --- a/lib/vue/src/components/input/CRichTextInput/RToolbar/TNodeAttr/Alignment.vue +++ b/lib/vue/src/components/input/CRichTextInput/RToolbar/TNodeAttr/Alignment.vue @@ -1,8 +1,8 @@