Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(table): make all table packages be in one package, add a new TableKit extension to configure them #5469

Draft
wants to merge 3 commits into
base: next
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .changeset/chilled-trees-agree.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"@tiptap/extension-collaboration": major
"@tiptap/extension-floating-menu": major
"@tiptap/extension-ordered-list": major
"@tiptap/extension-table-header": major
"@tiptap/extension-bubble-menu": major
"@tiptap/extension-bullet-list": major
"@tiptap/extension-font-family": major
Expand All @@ -17,7 +16,6 @@
"@tiptap/extension-code-block": major
"@tiptap/extension-dropcursor": major
"@tiptap/extension-hard-break": major
"@tiptap/extension-table-cell": major
"@tiptap/extension-text-align": major
"@tiptap/extension-text-style": major
"@tiptap/extension-typography": major
Expand All @@ -26,7 +24,6 @@
"@tiptap/extension-list-item": major
"@tiptap/extension-paragraph": major
"@tiptap/extension-subscript": major
"@tiptap/extension-table-row": major
"@tiptap/extension-task-item": major
"@tiptap/extension-task-list": major
"@tiptap/extension-underline": major
Expand Down
9 changes: 1 addition & 8 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
"@tiptap/extension-subscript": "2.5.6",
"@tiptap/extension-superscript": "2.5.6",
"@tiptap/extension-table": "2.5.6",
"@tiptap/extension-table-cell": "2.5.6",
"@tiptap/extension-table-header": "2.5.6",
"@tiptap/extension-table-row": "2.5.6",
"@tiptap/extension-task-item": "2.5.6",
"@tiptap/extension-task-list": "2.5.6",
"@tiptap/extension-text": "2.5.6",
Expand All @@ -58,9 +55,5 @@
"@tiptap/vue-2": "2.5.6",
"@tiptap/vue-3": "2.5.6"
},
"changesets": [
"dirty-bats-look",
"early-singers-begin",
"wise-beers-reflect"
]
"changesets": ["dirty-bats-look", "early-singers-begin", "wise-beers-reflect"]
}
12 changes: 4 additions & 8 deletions demos/src/Examples/Tables/React/index.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import './styles.scss'

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 { TableCell, TableKit } from '@tiptap/extension-table'
import { EditorContent, useEditor } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit'
import React from 'react'
Expand Down Expand Up @@ -132,11 +129,10 @@ export default () => {
const editor = useEditor({
extensions: [
StarterKit,
Table.configure({
resizable: true,
TableKit.configure({
table: { resizable: true },
tableCell: false,
}),
TableRow,
TableHeader,
// Default TableCell
// TableCell,
// Custom TableCell with backgroundColor attribute
Expand Down
14 changes: 6 additions & 8 deletions demos/src/Examples/Tables/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@
</template>

<script>
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 { TableCell, TableKit } from '@tiptap/extension-table'
import StarterKit from '@tiptap/starter-kit'
import { Editor, EditorContent } from '@tiptap/vue-3'

Expand Down Expand Up @@ -134,11 +131,12 @@ export default {
this.editor = new Editor({
extensions: [
StarterKit,
Table.configure({
resizable: true,
TableKit.configure({
table: {
resizable: true,
},
tableCell: false,
}),
TableRow,
TableHeader,
// Default TableCell
// TableCell,
// Custom TableCell with backgroundColor attribute
Expand Down
12 changes: 3 additions & 9 deletions demos/src/Experiments/All/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ import Placeholder from '@tiptap/extension-placeholder'
import Strike from '@tiptap/extension-strike'
import Subscript from '@tiptap/extension-subscript'
import Superscript from '@tiptap/extension-superscript'
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 { TableKit } from '@tiptap/extension-table'
import TaskItem from '@tiptap/extension-task-item'
import TaskList from '@tiptap/extension-task-list'
import Text from '@tiptap/extension-text'
Expand Down Expand Up @@ -155,12 +152,9 @@ export default {
class: 'mention',
},
}),
Table.configure({
resizable: true,
TableKit.configure({
table: { resizable: true },
}),
TableRow,
TableHeader,
TableCell,
Image,
TaskList,
TaskItem,
Expand Down
14 changes: 6 additions & 8 deletions demos/src/Experiments/GenericFigure/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@

<script>
import Image from '@tiptap/extension-image'
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 { TableKit } from '@tiptap/extension-table'
import StarterKit from '@tiptap/starter-kit'
import { Editor, EditorContent } from '@tiptap/vue-3'

Expand Down Expand Up @@ -161,10 +158,11 @@ export default {
this.editor = new Editor({
extensions: [
StarterKit,
Table,
TableRow,
TableHeader,
TableCell,
TableKit.configure({
table: {
resizable: true,
},
}),
ImageFigure,
TableFigure,
Figcaption,
Expand Down
12 changes: 3 additions & 9 deletions demos/src/Nodes/Table/React/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import './styles.scss'
import Document from '@tiptap/extension-document'
import Gapcursor from '@tiptap/extension-gapcursor'
import Paragraph from '@tiptap/extension-paragraph'
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 { TableKit } from '@tiptap/extension-table'
import Text from '@tiptap/extension-text'
import { EditorContent, useEditor } from '@tiptap/react'
import React from 'react'
Expand All @@ -18,12 +15,9 @@ export default () => {
Paragraph,
Text,
Gapcursor,
Table.configure({
resizable: true,
TableKit.configure({
table: { resizable: true },
}),
TableRow,
TableHeader,
TableCell,
],
content: `
<table>
Expand Down
12 changes: 3 additions & 9 deletions demos/src/Nodes/Table/Vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@
import Document from '@tiptap/extension-document'
import Gapcursor from '@tiptap/extension-gapcursor'
import Paragraph from '@tiptap/extension-paragraph'
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 { TableKit } from '@tiptap/extension-table'
import Text from '@tiptap/extension-text'
import { Editor, EditorContent } from '@tiptap/vue-3'

Expand All @@ -91,12 +88,9 @@ export default {
Paragraph,
Text,
Gapcursor,
Table.configure({
resizable: true,
TableKit.configure({
table: { resizable: true },
}),
TableRow,
TableHeader,
TableCell,
],
content: `
<table>
Expand Down
57 changes: 0 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading