uiwjs / uiwjs/react-codemirror
How can I change drag background-color ?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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