-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from hsuna/feature/table-property
feat(table module): add table property setting
- Loading branch information
Showing
15 changed files
with
622 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Editor } from 'slate' | ||
import { IButtonMenu, IDomEditor, t } from '@wangeditor-next/core' | ||
import { CELL_PROPERTY_SVG } from '../../constants/svg' | ||
import { isOfType } from '../../utils' | ||
import TableProperty from './TableProperty' | ||
|
||
class CellProperty extends TableProperty implements IButtonMenu { | ||
readonly title = t('tableModule.cellProperty') | ||
readonly iconSvg = CELL_PROPERTY_SVG | ||
readonly tag = 'button' | ||
readonly showModal = true | ||
readonly modalWidth = 300 | ||
|
||
getModalContentNode(editor: IDomEditor) { | ||
const [node] = Editor.nodes(editor, { | ||
match: isOfType(editor, 'td'), | ||
}) | ||
return node | ||
} | ||
} | ||
|
||
export default CellProperty |
Oops, something went wrong.