Skip to content

Commit

Permalink
fix(lexical-playground): add experimental table to component picker o…
Browse files Browse the repository at this point in the history
…ptions
  • Loading branch information
smzst committed Jan 27, 2023
1 parent 70eed93 commit 42dd114
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {InsertEquationDialog} from '../EquationsPlugin';
import {INSERT_EXCALIDRAW_COMMAND} from '../ExcalidrawPlugin';
import {INSERT_IMAGE_COMMAND, InsertImageDialog} from '../ImagesPlugin';
import {InsertPollDialog} from '../PollPlugin';
import {InsertTableDialog} from '../TablePlugin';
import {InsertNewTableDialog, InsertTableDialog} from '../TablePlugin';

class ComponentPickerOption extends TypeaheadOption {
// What shows up in the editor
Expand Down Expand Up @@ -204,6 +204,14 @@ export default function ComponentPickerMenuPlugin(): JSX.Element {
<InsertTableDialog activeEditor={editor} onClose={onClose} />
)),
}),
new ComponentPickerOption('Table (Experimental)', {
icon: <i className="icon table" />,
keywords: ['table', 'grid', 'spreadsheet', 'rows', 'columns'],
onSelect: () =>
showModal('Insert Table', (onClose) => (
<InsertNewTableDialog activeEditor={editor} onClose={onClose} />
)),
}),
new ComponentPickerOption('Numbered List', {
icon: <i className="icon number" />,
keywords: ['numbered list', 'ordered list', 'ol'],
Expand Down

0 comments on commit 42dd114

Please sign in to comment.