mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 07:40:13 +08:00
clean up
This commit is contained in:
parent
64ba3fd212
commit
790524d5cb
@ -87,6 +87,7 @@ export default {
|
||||
Document,
|
||||
Paragraph,
|
||||
Text,
|
||||
Gapcursor,
|
||||
Table.configure({
|
||||
resizable: true,
|
||||
}),
|
||||
@ -95,6 +96,7 @@ export default {
|
||||
TableCell.extend({
|
||||
addAttributes() {
|
||||
return {
|
||||
// original attributes
|
||||
colspan: {
|
||||
default: 1,
|
||||
},
|
||||
@ -104,11 +106,10 @@ export default {
|
||||
colwidth: {
|
||||
default: null,
|
||||
},
|
||||
// add a color attribute to the table cell
|
||||
color: {
|
||||
default: null,
|
||||
// Take the attribute values
|
||||
renderHTML: attributes => {
|
||||
// … and return an object with HTML attributes.
|
||||
return {
|
||||
style: `color: ${attributes.color}`,
|
||||
}
|
||||
@ -117,7 +118,6 @@ export default {
|
||||
}
|
||||
},
|
||||
}),
|
||||
Gapcursor,
|
||||
],
|
||||
content: `
|
||||
<p>
|
||||
|
@ -18,7 +18,6 @@ import {
|
||||
toggleHeaderCell,
|
||||
setCellAttr,
|
||||
fixTables,
|
||||
CellSelection,
|
||||
} from 'prosemirror-tables'
|
||||
import { TextSelection } from 'prosemirror-state'
|
||||
import { createTable } from './utilities/createTable'
|
||||
@ -100,7 +99,6 @@ export const Table = Node.create({
|
||||
return deleteTable(state, dispatch)
|
||||
},
|
||||
mergeCells: (): Command => ({ state, dispatch }) => {
|
||||
console.log('mergeCells', { state }, state.selection instanceof CellSelection)
|
||||
return mergeCells(state, dispatch)
|
||||
},
|
||||
splitCell: (): Command => ({ state, dispatch }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user