diff --git a/demo/components/Playground.tsx b/demo/components/Playground.tsx index d520fc2df..402bedc44 100644 --- a/demo/components/Playground.tsx +++ b/demo/components/Playground.tsx @@ -56,6 +56,7 @@ const wCommandMenuConfig = wysiwygToolbarConfigs.wCommandMenuConfig.concat( ); export type PlaygroundProps = { + mobile?: boolean; initial?: MarkupString; allowHTML?: boolean; settingsVisible?: boolean | SettingItems[]; @@ -107,6 +108,7 @@ logger.setLogger({ export const Playground = memo((props) => { const { + mobile, initial, initialEditor, initialSplitModeEnabled, @@ -174,6 +176,7 @@ export const Playground = memo((props) => { const mdEditor = useMarkdownEditor( { logger, + mobile, preset: 'full', wysiwygConfig: { placeholderOptions: placeholderOptions, @@ -261,6 +264,7 @@ export const Playground = memo((props) => { }, }, [ + mobile, allowHTML, linkify, linkifyTlds, diff --git a/demo/components/PlaygroundMini.tsx b/demo/components/PlaygroundMini.tsx index 6fb1bc986..91e2b63cb 100644 --- a/demo/components/PlaygroundMini.tsx +++ b/demo/components/PlaygroundMini.tsx @@ -6,6 +6,7 @@ import {Playground, type PlaygroundProps} from './Playground'; export type PlaygroundMiniProps = Pick< PlaygroundProps, + | 'mobile' | 'initialEditor' | 'settingsVisible' | 'breaks' diff --git a/demo/defaults/args.ts b/demo/defaults/args.ts index 210c651f5..40b248ce7 100644 --- a/demo/defaults/args.ts +++ b/demo/defaults/args.ts @@ -5,6 +5,7 @@ import type {PlaygroundMiniProps} from '../components/PlaygroundMini'; export const args: Meta['args'] = { initialEditor: 'wysiwyg', settingsVisible: true, + mobile: false, allowHTML: true, breaks: true, linkify: true, diff --git a/demo/stories/playground/Playground.stories.tsx b/demo/stories/playground/Playground.stories.tsx index f5e0f166d..493dcb158 100644 --- a/demo/stories/playground/Playground.stories.tsx +++ b/demo/stories/playground/Playground.stories.tsx @@ -6,6 +6,7 @@ import {getInitialMd} from '../../utils/getInitialMd'; export const Story: StoryObj = { args: { + mobile: false, disableMarkdownItAttrs: true, }, }; diff --git a/src/bundle/toolbar/ToolbarButtonWithPopupMenu.tsx b/src/bundle/toolbar/ToolbarButtonWithPopupMenu.tsx index a875e55c6..77ef301bc 100644 --- a/src/bundle/toolbar/ToolbarButtonWithPopupMenu.tsx +++ b/src/bundle/toolbar/ToolbarButtonWithPopupMenu.tsx @@ -31,20 +31,20 @@ export type MenuItem = { ignoreActive?: boolean; }; -export type ToolbarButtonWithPopupMenuProps = Omit< - ToolbarBaseProps & - Pick & { - icon: ToolbarIconData; - iconClassName?: string; - chevronIconClassName?: string; - title: string | (() => string); - menuItems: MenuItem[]; - /** @default 'classic' */ - _selectionType?: 'classic' | 'light'; - qaMenu?: string; - }, - 'editor' ->; +export type ToolbarButtonWithPopupMenuProps = Pick< + ToolbarBaseProps, + 'className' | 'focus' | 'onClick' | 'qa' +> & + Pick & { + icon: ToolbarIconData; + iconClassName?: string; + chevronIconClassName?: string; + title: string | (() => string); + menuItems: MenuItem[]; + /** @default 'classic' */ + _selectionType?: 'classic' | 'light'; + qaMenu?: string; + }; export const ToolbarButtonWithPopupMenu: React.FC = ({ disablePortal, diff --git a/src/bundle/toolbar/custom/ToolbarColors.tsx b/src/bundle/toolbar/custom/ToolbarColors.tsx index 07b4c72aa..545c7cadc 100644 --- a/src/bundle/toolbar/custom/ToolbarColors.tsx +++ b/src/bundle/toolbar/custom/ToolbarColors.tsx @@ -76,7 +76,10 @@ export const ToolbarColors: React.FC = (props) => { return (