Description
The "Export as Markdown" and "Import Markdown" actions are only accessible via the page menu dropdown (⋯ button in the top-right). Usage data from the feedback digests consistently shows very low adoption — editor.export and editor.import each average ~1 use per week. Adding these actions to the slash command menu would improve discoverability since the slash menu is the primary command interface and users already use it to insert blocks.
Evidence
User feedback (Slack #memo-user-feedback): Multiple feedback digests (May 14, May 10, May 8, April 24) note that editor.export and editor.import have the lowest usage of all tracked events (1 use/week each). The May 10 digest explicitly states "Import/export each have only 1 event — low discoverability or niche use case." The slash command menu (src/components/editor/slash-command-plugin.tsx) currently has 16+ block insertion commands but no export/import actions.
Acceptance Criteria
Technical Notes
- Add two new
SlashCommandOption entries to the baseOptions array in src/components/editor/slash-command-plugin.tsx
- For Export: reuse
exportEditorToMarkdown and downloadMarkdown from src/components/editor/markdown-utils.ts. Access the editor instance via the useLexicalComposerContext hook already in scope.
- For Import: dispatch a custom command or use the existing
useMarkdownImport hook pattern. Since the slash command plugin runs inside the editor context, it may need to trigger a file input click — follow the same pattern as openImagePicker in image-plugin.tsx.
- Use
Download and Upload icons from lucide-react (already imported in page-menu.tsx)
- The page menu keyboard shortcuts (⌘⇧E for export) should still work independently
Description
The "Export as Markdown" and "Import Markdown" actions are only accessible via the page menu dropdown (⋯ button in the top-right). Usage data from the feedback digests consistently shows very low adoption —
editor.exportandeditor.importeach average ~1 use per week. Adding these actions to the slash command menu would improve discoverability since the slash menu is the primary command interface and users already use it to insert blocks.Evidence
User feedback (Slack #memo-user-feedback): Multiple feedback digests (May 14, May 10, May 8, April 24) note that
editor.exportandeditor.importhave the lowest usage of all tracked events (1 use/week each). The May 10 digest explicitly states "Import/export each have only 1 event — low discoverability or niche use case." The slash command menu (src/components/editor/slash-command-plugin.tsx) currently has 16+ block insertion commands but no export/import actions.Acceptance Criteria
Download, description: "Download page as .md file")Upload, description: "Import content from a .md file")exportEditorToMarkdown+downloadMarkdownflow as the page menu/export,/import)SlashCommandPluginupdated to show the new optionspnpm lint && pnpm typecheck && pnpm testpassTechnical Notes
SlashCommandOptionentries to thebaseOptionsarray insrc/components/editor/slash-command-plugin.tsxexportEditorToMarkdownanddownloadMarkdownfromsrc/components/editor/markdown-utils.ts. Access the editor instance via theuseLexicalComposerContexthook already in scope.useMarkdownImporthook pattern. Since the slash command plugin runs inside the editor context, it may need to trigger a file input click — follow the same pattern asopenImagePickerinimage-plugin.tsx.DownloadandUploadicons from lucide-react (already imported inpage-menu.tsx)