uiwjs / uiwjs/react-codemirror

How can I change drag background-color ?

Open
#491 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
161
PR merge metrics
No merged PRs in 30d

Description

스크린샷 2023-04-20 오후 3 28 28

I want to change drag back-ground-color

i've changed theme selection color, but it doesnt work

`

import ReactCodeMirror from "@uiw/react-codemirror";
import {
loadLanguage,
langNames,
langs,
} from "@uiw/codemirror-extensions-langs";
import classes from "./EditorBox.module.css";
import createTheme from "@uiw/codemirror-themes";
import { markdown, markdownLanguage } from "@codemirror/lang-markdown";
import { languages } from "@codemirror/language-data";
import { EditorView } from "@codemirror/view";
import { javascript } from "@codemirror/lang-javascript";

type ContentType = {
content: string;
contentHandler: () => void;
};

const myTheme = createTheme({
theme: "dark",
settings: {
background: "#121212",
foreground: "#4D4D4C",
caret: "#AEAFAD",
selection: "#000",
selectionMatch: "#000",
gutterBackground: "#FFFFFF",
gutterForeground: "#4D4D4C",
gutterBorder: "#ddd",
gutterActiveForeground: "",
lineHighlight: "#EFEFEF",
},
styles: [],
});

loadLanguage("tsx");

export default function EditorBox({ content, contentHandler }: ContentType) {
return (
<>


<ReactCodeMirror
theme={myTheme}
value={content}
onChange={contentHandler}
height="100vh"
basicSetup={{
foldGutter: false,
lineNumbers: false,
highlightActiveLine: false,
}}
extensions={[
markdown({ base: markdownLanguage, codeLanguages: languages }),
EditorView.lineWrapping,
javascript({ jsx: true }),
]}
/>

</>
);
}

`

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ReactCodeMirror theme configuration shown in the issue and the imported EditorBox.module.css file, then inspect how drag styling is applied. Verify the result by dragging text in the editor and confirming the background color changes as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.