uiwjs / uiwjs/react-codemirror
Emmet Plugin is Not Working
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
i tried to use new emmet plugin for codemirror v6 but it's not working, any way to fix this ?
import CodeMirror from "@uiw/react-codemirror";
import { html } from "@codemirror/lang-html";
import { keymap } from "@codemirror/view";
import { expandAbbreviation } from "@emmetio/codemirror6-plugin";
const htmlcode = `<html>
<head>
<title>My page</title>
</head>
<body>
<h1>My page</h1>
<p>A page about me.</p>
</body>
</html>
`;
export default function App() {
return (
<CodeMirror
value={htmlcode}
height="200px"
extensions={[
html(),
keymap.of([
{
key: "Tab",
run: expandAbbreviation,
},
]),
]}
/>
);
}
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
Reproduce the issue with the provided React component and its html(), keymap.of(), and expandAbbreviation setup. Check whether pressing Tab expands an Emmet abbreviation in the CodeMirror editor; done means the supplied integration works as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100