Skip to content

Commit

Permalink
Add Columns Layout to Typeahead menu (#5136)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivailop7 committed Oct 19, 2023
1 parent dfa24df commit a02164b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {INSERT_COLLAPSIBLE_COMMAND} from '../CollapsiblePlugin';
import {InsertEquationDialog} from '../EquationsPlugin';
import {INSERT_EXCALIDRAW_COMMAND} from '../ExcalidrawPlugin';
import {INSERT_IMAGE_COMMAND, InsertImageDialog} from '../ImagesPlugin';
import InsertLayoutDialog from '../LayoutPlugin/InsertLayoutDialog';
import {INSERT_PAGE_BREAK} from '../PageBreakPlugin';
import {InsertPollDialog} from '../PollPlugin';
import {InsertNewTableDialog, InsertTableDialog} from '../TablePlugin';
Expand Down Expand Up @@ -300,6 +301,14 @@ function getBaseOptions(editor: LexicalEditor, showModal: ShowModal) {
onSelect: () =>
editor.dispatchCommand(INSERT_COLLAPSIBLE_COMMAND, undefined),
}),
new ComponentPickerOption('Columns Layout', {
icon: <i className="icon columns" />,
keywords: ['columns', 'layout', 'grid'],
onSelect: () =>
showModal('Insert Columns Layout', (onClose) => (
<InsertLayoutDialog activeEditor={editor} onClose={onClose} />
)),
}),
...(['left', 'center', 'right', 'justify'] as const).map(
(alignment) =>
new ComponentPickerOption(`Align ${alignment}`, {
Expand Down

2 comments on commit a02164b

@vercel
Copy link

@vercel vercel bot commented on a02164b Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lexical – ./packages/lexical-website

lexical-git-main-fbopensource.vercel.app
lexical-fbopensource.vercel.app
lexicaljs.com
lexicaljs.org
lexical.dev
www.lexical.dev

@vercel
Copy link

@vercel vercel bot commented on a02164b Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lexical-playground – ./packages/lexical-playground

lexical-playground.vercel.app
lexical-playground-fbopensource.vercel.app
lexical-playground-git-main-fbopensource.vercel.app
playground.lexical.dev

Please sign in to comment.