-
Notifications
You must be signed in to change notification settings - Fork 3.7k
improvement(rich-markdown-editor): strict inline-mark paste, table column-resize cursor, docs #5455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+125
−2
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f68d973
fix(rich-markdown-editor): show the col-resize cursor on table column…
waleedlatif1 e862663
test(rich-markdown-editor): exhaustive markdown paste coverage
waleedlatif1 14b44c2
docs(editor): add rich markdown editor page
waleedlatif1 5581443
test(rich-markdown-editor): scope paste tests to what MarkdownPaste a…
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| title: Editor | ||
| description: A rich markdown editor for your files — type markdown and watch it render, or edit visually. | ||
| pageType: concept | ||
| --- | ||
|
|
||
| import { Image } from '@/components/ui/image' | ||
| import { Card, Cards } from 'fumadocs-ui/components/card' | ||
| import { Callout } from 'fumadocs-ui/components/callout' | ||
|
|
||
| Every markdown file in your workspace opens in a **rich editor**. Type markdown and it renders as you go, or format visually with the toolbar and slash menu. What you see is exactly what gets saved — plain markdown underneath, no lock-in. | ||
|
|
||
| <div className="mx-auto w-full overflow-hidden rounded-lg my-6"> | ||
| <Image src="/static/files/editor/overview.png" alt="A markdown file rendered in the editor: headings, bold, italic, and a link, a nested bullet list, and a table" width={900} height={410} /> | ||
| </div> | ||
|
|
||
| ## Formatting text | ||
|
|
||
| Select any text to bring up the formatting toolbar — bold, italic, strikethrough, inline code, and links. The same marks appear instantly as you type the markdown for them, like `**bold**` or `*italic*`. Links show a hover card so you can open, copy, edit, or remove them without hunting through the source. | ||
|
|
||
| ## Structure | ||
|
|
||
| Headings, blockquotes, and dividers keep long documents scannable. Type `# ` through `###### ` for headings, `> ` for a quote, and `---` for a divider. | ||
|
|
||
| ## Lists and checklists | ||
|
|
||
| Bullet, ordered, and nested lists all work, plus task lists you can tick right in the document. | ||
|
|
||
| ## Tables | ||
|
|
||
| Insert a table from the slash menu, then click any cell for the floating table toolbar — add or remove rows and columns, toggle the header row, or delete the table. Drag a column border to resize it. | ||
|
|
||
| ## Code blocks | ||
|
|
||
| Fenced code blocks are syntax-highlighted, with a language picker in the corner. Pick `mermaid` to render a live diagram instead of code. | ||
|
|
||
| ## Images | ||
|
|
||
| Paste or drag an image straight into the document, then drag a corner to resize it. | ||
|
|
||
| ## Slash menu and shortcuts | ||
|
|
||
| Type `/` anywhere to insert any block — heading, list, table, code block, image, and more — without leaving the keyboard. Familiar shortcuts work too: **Cmd/Ctrl + B** for bold, **Cmd/Ctrl + I** for italic, and **Cmd/Ctrl + K** to add a link over selected text. | ||
|
|
||
| ## Markdown fidelity | ||
|
|
||
| The editor round-trips your markdown exactly — it saves what you wrote, with no reformatting churn. | ||
|
|
||
| <Callout type="info"> | ||
| A few constructs can't be represented visually without losing information on save — footnotes, raw HTML, and HTML comments. When a file contains one of these, it opens **read-only** so the original source is preserved untouched. Everything is still rendered faithfully; you just can't edit that file inline. | ||
| </Callout> | ||
|
|
||
| <Cards> | ||
| <Card title="Generating files" href="/files/generating" description="Have a workflow produce a document from a run." /> | ||
| <Card title="Using files in workflows" href="/files/using-in-workflows" description="Read a file into a workflow and produce one from a run." /> | ||
| </Cards> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.