Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

CodeBlock not render properly (Colors)! #21

Open

Description

@chetanmajithiya

codeBlock keyword element are getting separately to get styles from css,

Activity

  1. chetanmajithiya commented on Dec 13, 2020

    @chetanmajithiya
    Author

    <EuiCodeBlock language="js" fontSize="m" paddingSize="m" overflowHeight={300} isCopyable>{code}</EuiCodeBlock>

  2. chandlerprall commented on Dec 15, 2020

    @chandlerprall
    Contributor

    Using the same settings within code sandbox highlights the code for me: https://codesandbox.io/s/young-hooks-xylik?file=/index.js

    Can you check the devtools' Console and Network tabs for any errors?

  3. chandlerprall commented on Dec 16, 2020

    @chandlerprall
    Contributor

    Sorry, I lost track of which repo this was asked in. We have limited the language support in this nextjs starter to avoid bloating the bundle size, unless additional languages are needed. Two options:

    1. You can setup your own list of included languages by modifying src/lib/highlight.ts
    2. You can remove the custom configuration entirely in next.config.js by removing lines 104-107
      new NormalModuleReplacementPlugin(
      /^highlight\.js$/,
      path.join(__dirname, `src/lib/highlight.ts`)
      )
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions