Skip to content

feat(document): add Copy as Markdown action for documents - #11106

Open
MichaelUray wants to merge 1 commit into
hcengineering:developfrom
MichaelUray:feat/document-copy-markdown
Open

MichaelUray wants to merge 1 commit into
hcengineering:developfrom
MichaelUray:feat/document-copy-markdown

Conversation

@MichaelUray

Copy link
Copy Markdown
Contributor

Fixes #10301

Problem and change

The CopyDocumentMarkdown view action already converts a collaborative content field to Markdown and copies it to the clipboard, but it was only registered for cards and controlled documents. Regular documents (document:class:Document) had no way to get their content as Markdown; copying selected text yields plain text with lots of extra blank lines.

Register the existing action for document:class:Document using its collaborative 'content' field, in the context menu ('copy' group) and the action palette.

Tests

Manual: Documents → document "..." menu → "Copy as Markdown" → the clipboard contains the document as Markdown.

The CopyDocumentMarkdown view action already converts a collaborative content field to Markdown and copies it to the clipboard, but it was only registered for cards and controlled documents. Regular documents (document:class:Document) had no way to get their content as Markdown; copying selected text yields plain text with lots of extra blank lines.

Register the existing action for document:class:Document using its collaborative 'content' field, in the context menu ('copy' group) and the action palette.

Fixes hcengineering#10301

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

Feature request: Documents - Copy as markdown for text/plain

1 participant