From be1bb388924f4422058099dcb0debdd1c857d36a Mon Sep 17 00:00:00 2001 From: kamtschatka Date: Sun, 9 Jun 2024 15:30:56 +0200 Subject: feature(web): Add syntax highlighting to code blocks and a quick copy button. Fixes #195 (#197) * Any plans to support copy to clipboard (markdown code) for notes? #195 added a button to copy the markdown and added code highlighting * Any plans to support copy to clipboard (markdown code) for notes? #195 Changed the copy-button to a generic one added a safeguard and a message to the copy button if copying is not possible * Some code cleanups --------- Co-authored-by: kamtschatka Co-authored-by: MohamedBassem --- apps/web/package.json | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apps/web/package.json') diff --git a/apps/web/package.json b/apps/web/package.json index ebec0278..91743602 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -62,6 +62,7 @@ "react-markdown": "^9.0.1", "react-masonry-css": "^1.0.16", "react-select": "^5.8.0", + "react-syntax-highlighter": "^15.5.0", "sharp": "^0.33.3", "superjson": "^2.2.1", "tailwind-merge": "^2.2.1", @@ -76,6 +77,7 @@ "@types/emoji-mart": "^3.0.14", "@types/react": "^18.2.55", "@types/react-dom": "^18.2.19", + "@types/react-syntax-highlighter": "^15.5.13", "autoprefixer": "^10.4.17", "postcss": "^8.4.35", "tailwindcss": "^3.4.1", -- cgit v1.2.3-70-g09d2