You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's been a request in the AEM platform for use of the code-snippet component for use in technical writing. A couple of component improvements that have been brainstormed are adding the option for text-wrapping (instead of overflowing the x-axis) and syntax highlighting for ease of readability.
lang="scss" can be used to dynamically import highlight JS assets to help apply syntax highlighting wrap can be used to enable text wrapping within the component instead of overflowing the width of the component
Hey @andy-blum! Text wrapping is already supported through the wrapText prop. As far as syntax highlighting goes, we've had a few discussions about this, but ultimately have left it up to product teams to determine a syntax highlighting theme that works best for their use-case. CodeSnippet should work with libraries like https://prismjs.com/ and https://highlightjs.org/, but please let us know if that is not the case.
The problem
There's been a request in the AEM platform for use of the code-snippet component for use in technical writing. A couple of component improvements that have been brainstormed are adding the option for text-wrapping (instead of overflowing the x-axis) and syntax highlighting for ease of readability.
The solution
I'm envisioning these as opt-in features like so:
lang="scss"
can be used to dynamically import highlight JS assets to help apply syntax highlightingwrap
can be used to enable text wrapping within the component instead of overflowing the width of the componentApplication/website
https://carbon-design-system.github.io/carbon-for-ibm-dotcom/canary/carbon-web-components/?path=/story/components-code-snippet--multi-line
Business priority
Low Priority = release date is not dependent on fix or not upcoming
What time frame would this ideally be needed by (if applicable)
No response
Examples
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: