+ isActive: neverActive,
+ isDisabled: cellNotSelected,
+};
+
+export const rowProperties: EditorButtonDefinition = {
+ label: 'Row properties',
+ format: 'long',
+ action(context: EditorUiContext) {
+ context.editor.getEditorState().read(() => {
+ const cell = $getNodeFromSelection($getSelection(), $isTableCellNode);
+ if (!$isTableCellNode(cell)) {
+ return;
+ }
+
+ const row = $getParentOfType(cell, $isTableRowNode);
+ const modalForm = context.manager.createModal('row_properties');
+ modalForm.show({});
+ // TODO
+ });
+ },
+ isActive: neverActive,
+ isDisabled: cellNotSelected,
+};
+
+export const cutRow: EditorButtonDefinition = {
+ label: 'Cut row',
+ format: 'long',
+ action(context: EditorUiContext) {
+ context.editor.getEditorState().read(() => {
+ // TODO
+ });
+ },
+ isActive: neverActive,
+ isDisabled: cellNotSelected,
+};
+
+export const copyRow: EditorButtonDefinition = {
+ label: 'Copy row',
+ format: 'long',
+ action(context: EditorUiContext) {
+ context.editor.getEditorState().read(() => {
+ // TODO
+ });
+ },
+ isActive: neverActive,
+ isDisabled: cellNotSelected,
+};
+
+export const pasteRowBefore: EditorButtonDefinition = {
+ label: 'Paste row before',
+ format: 'long',
+ action(context: EditorUiContext) {
+ context.editor.getEditorState().read(() => {
+ // TODO
+ });
+ },
+ isActive: neverActive,
+ isDisabled: cellNotSelected,
+};
+
+export const pasteRowAfter: EditorButtonDefinition = {
+ label: 'Paste row after',
+ format: 'long',
+ action(context: EditorUiContext) {
+ context.editor.getEditorState().read(() => {
+ // TODO
+ });
+ },
+ isActive: neverActive,
+ isDisabled: cellNotSelected,
+};
+
+export const cutColumn: EditorButtonDefinition = {
+ label: 'Cut column',
+ format: 'long',
+ action(context: EditorUiContext) {
+ context.editor.getEditorState().read(() => {
+ // TODO
+ });
+ },
+ isActive: neverActive,
+ isDisabled: cellNotSelected,
+};
+
+export const copyColumn: EditorButtonDefinition = {
+ label: 'Copy column',
+ format: 'long',
+ action(context: EditorUiContext) {
+ context.editor.getEditorState().read(() => {
+ // TODO
+ });
+ },
+ isActive: neverActive,
+ isDisabled: cellNotSelected,
+};
+
+export const pasteColumnBefore: EditorButtonDefinition = {
+ label: 'Paste column before',
+ format: 'long',
+ action(context: EditorUiContext) {
+ context.editor.getEditorState().read(() => {
+ // TODO
+ });
+ },
+ isActive: neverActive,
+ isDisabled: cellNotSelected,
+};
+
+export const pasteColumnAfter: EditorButtonDefinition = {
+ label: 'Paste column after',
+ format: 'long',
+ action(context: EditorUiContext) {
+ context.editor.getEditorState().read(() => {
+ // TODO
+ });
+ },
+ isActive: neverActive,
+ isDisabled: cellNotSelected,