react-textarea-code-editor icon indicating copy to clipboard operation
react-textarea-code-editor copied to clipboard

fail to show line number

Open jingyuhhh opened this issue 9 months ago • 1 comments

here is my code. I'm confused where goes wrong.

import CodeEditor from "@uiw/react-textarea-code-editor";
import rehypePrism from "rehype-prism-plus";

export const Sparql = () => {
  return (
    <CodeEditor
      value={`  SELECT ?x ?name
  {
    ?x  foaf:mbox <mailto:alice@example> .
    ?x  foaf:knows ?a1 .
    ?a1 foaf:knows ?a2 .
    ?a2 foaf:name ?name .
  }`}
      language="sparql"
      data-color-mode="light"
      rehypePlugins={[
        [rehypePrism, { ignoreMissing: true, showLineNumbers: true }],
      ]}
      style={{
        fontFamily:
          'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace',
      }}
    />
  );
};


jingyuhhh avatar Jan 16 '25 07:01 jingyuhhh