Skip to content

Add word wrap toggle on code snippets 馃攢#525

Description

@anoopcodehack

Add word wrap toggle on code snippets 馃攢

File: client/src/components/Board/TaskCard.jsx

Long code lines overflow the snippet box 馃拃
No way to toggle word wrap fr!!

Fix:
const [wrap, setWrap] = useState(false)

<button onClick={(e) => {
e.stopPropagation()
setWrap(v => !v)
}}
className="text-[10px] text-[#555]
hover:text-purple-400 transition">
{wrap ? '鈫旓笍 unwrap' : '鈫╋笍 wrap'}

<SyntaxHighlighter
wrapLines={wrap}
wrapLongLines={wrap}
...

~6 lines! No backend needed 馃幆
Super useful for long code lines!! 馃敟

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions