Skip to content

Commit

Permalink
rendered, optional table external
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Oct 23, 2024
1 parent 9ecb20c commit 4746f1a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 86 deletions.
2 changes: 1 addition & 1 deletion packages/dante3/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dante3",
"description": "Dante3 is a text editor built on top of TipTap",
"version": "1.3.3",
"version": "1.3.5",
"main": "package/Dante.cjs.js",
"jsnext:main": "package/Dante.es.js",
"module": "package/Dante.es.js",
Expand Down
27 changes: 0 additions & 27 deletions packages/dante3/src/editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ import Focus from "@tiptap/extension-focus";
import Link from "@tiptap/extension-link";
import Dropcursor from '@tiptap/extension-dropcursor'

import Table from '@tiptap/extension-table'
import TableCell from '@tiptap/extension-table-cell'
import TableHeader from '@tiptap/extension-table-header'
import TableRow from '@tiptap/extension-table-row'


import { extensionFactory } from "../blocks/extension";
import {AddButtonConfig} from "../popovers/addButton";
import {MenuBarConfig} from "../popovers/menuBar";
Expand Down Expand Up @@ -121,27 +115,6 @@ const DanteEditor = ({
Link,
Dropcursor,

Table.configure({
HTMLAttributes: {
class: "table-auto",
},
resizable: true,
}),
TableRow.configure({
HTMLAttributes: {
class: "graf graf--tr",
},
}),
TableHeader.configure({
HTMLAttributes: {
class: "graf graf--th",
},
}),
TableCell.configure({
HTMLAttributes: {
class: "graf graf--tc",
},
}),
/*Link.extend({
addNodeView() {
return ReactNodeViewRenderer(CodeBlock);
Expand Down
58 changes: 0 additions & 58 deletions packages/dante3/src/styled/base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -796,64 +796,6 @@ const EditorContainer = styled.div`
font-weight: 700;
}
}
/* Table-specific styling */
table {
border-collapse: collapse;
margin: 0;
overflow: hidden;
table-layout: fixed;
width: 100%;
td,
th {
border: 1px solid var(--gray-1);
box-sizing: border-box;
min-width: 1em;
padding: 6px 8px;
position: relative;
vertical-align: top;
> * {
margin-bottom: 0;
}
}
th {
background-color: var(--gray-2);
font-weight: bold;
text-align: left;
}
.selectedCell:after {
background: var(--gray-3);
content: "";
left: 0; right: 0; top: 0; bottom: 0;
pointer-events: none;
position: absolute;
z-index: 2;
}
.column-resize-handle {
background-color: var(--purple);
bottom: -2px;
pointer-events: none;
position: absolute;
right: -2px;
top: 0;
width: 4px;
}
}
.tableWrapper {
margin: 1.5rem 0;
overflow-x: auto;
}
&.resize-cursor {
cursor: ew-resize;
cursor: col-resize;
}
}
Expand Down

0 comments on commit 4746f1a

Please sign in to comment.