Skip to content

Commit

Permalink
set clipboard text to markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Nov 21, 2023
1 parent e79d5c7 commit a722235
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/home/report/ContextMenu/ContextMenuActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,11 @@ export default [
Clipboard.setString(logMessage);
} else if (content) {
const parser = new ExpensiMark();
const markdown = parser.htmlToMarkdown(content);
if (!Clipboard.canSetHtml()) {
Clipboard.setString(parser.htmlToMarkdown(content));
Clipboard.setString(markdown);
} else {
const plainText = parser.htmlToText(content);
Clipboard.setHtml(content, plainText);
Clipboard.setHtml(content, markdown);
}
}
}
Expand Down

0 comments on commit a722235

Please sign in to comment.