Skip to content

feat(editor): improve markdown insert tools#1040

Merged
perber merged 1 commit into
mainfrom
feat/editor-insert-tools
May 24, 2026
Merged

feat(editor): improve markdown insert tools#1040
perber merged 1 commit into
mainfrom
feat/editor-insert-tools

Conversation

@perber

@perber perber commented May 24, 2026

Copy link
Copy Markdown
Owner

Add a link insert dialog with internal page suggestions and keyboard support.

Improve toolbar formatting actions with inline code shortcuts, a table size picker, and more predictable wrap and unwrap behavior in the editor.

Copilot AI review requested due to automatic review settings May 24, 2026 16:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the markdown editing experience by adding a dedicated link-insert dialog (with internal page suggestions) and improving editor formatting tools (inline code shortcut, table insertion UI, and more robust wrap/unwrap behavior).

Changes:

  • Added a new Link Insert dialog, registered in the global dialog registry and invokable via toolbar and Mod+K.
  • Expanded editor hotkeys via useToolbarActions (inline code + link dialog) and CodeMirror keymap (inline code).
  • Improved formatting utilities: table size picker in the toolbar, new replaceSelection editor API, and smarter wrap/unwrap logic in insertWrappedText.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
ui/leafwiki-ui/src/lib/registries/index.tsx Registers the new link insert dialog type and renderer in the global dialog registry.
ui/leafwiki-ui/src/features/editor/useToolbarActions.tsx Adds hotkeys for inline code and opening the link dialog.
ui/leafwiki-ui/src/features/editor/PageEditor.tsx Wires new toolbar actions (inline code) and provides an openLinkDialog handler.
ui/leafwiki-ui/src/features/editor/MarkdownToolbar.tsx Adds table size picker UI, updates link behavior to open the dialog, and adds inline code button.
ui/leafwiki-ui/src/features/editor/MarkdownEditor.tsx Extends the editor ref API with replaceSelection to support dialog-driven insertions.
ui/leafwiki-ui/src/features/editor/MarkdownCodeEditor.tsx Adds `Mod-`` shortcut and updates CM styling for horizontal scrolling/non-wrapping behavior.
ui/leafwiki-ui/src/features/editor/LinkInsertDialog.tsx Introduces the new dialog UI with internal page suggestions and keyboard handling.
ui/leafwiki-ui/src/features/editor/editorCommands.ts Improves wrap/unwrap behavior when toggling formatting around selections.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/leafwiki-ui/src/features/editor/MarkdownToolbar.tsx
Comment thread ui/leafwiki-ui/src/features/editor/MarkdownToolbar.tsx
Comment thread ui/leafwiki-ui/src/features/editor/MarkdownToolbar.tsx Outdated
Comment thread ui/leafwiki-ui/src/features/editor/LinkInsertDialog.tsx
Comment thread ui/leafwiki-ui/src/features/editor/LinkInsertDialog.tsx
Comment thread ui/leafwiki-ui/src/features/editor/useToolbarActions.tsx
@perber
perber force-pushed the feat/editor-insert-tools branch from 9b917f2 to 53bdfb3 Compare May 24, 2026 17:08
Add a link insert dialog with internal page suggestions and keyboard support.

Improve toolbar formatting actions with inline code shortcuts, a table size picker, and more predictable wrap and unwrap behavior in the editor.
@perber
perber force-pushed the feat/editor-insert-tools branch from 53bdfb3 to 24b2bbc Compare May 24, 2026 17:34
@perber
perber merged commit 7edace3 into main May 24, 2026
8 checks passed
@perber
perber deleted the feat/editor-insert-tools branch May 24, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants