-
-
Notifications
You must be signed in to change notification settings - Fork 146
Codemirror 6 #88
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@mraghuram Wait for the official version to released. |
Thanks. Looks like final beta is out. |
Any update on this? |
@addingama Still waiting... |
Upgrade |
import CodeMirror from '@uiw/react-codemirror';
- import 'codemirror/mode/javascript/javascript';
+ import { javascript } from "@codemirror/lang-javascript";
const code = 'console.log("hello world!");';
<CodeMirror
value={code}
- options={{
- mode: 'js',
- }}
+ extensions={[
+ javascript({ jsx: true })
+ ]}
/> |
I have not found any language packs that support yaml. Can you help me? |
@jaywcjlove 我看这个链接,没有发现可以支持yaml的语言包,这是怎么回事呢?我需要你的帮助 |
@gitluck1314 https://gitee.com/uiw/react-codemirror
import CodeMirror from '@uiw/react-codemirror';
import { StreamLanguage } from '@codemirror/language';
import { yaml } from '@codemirror/legacy-modes/mode/yaml';
const yamlLang = `yaml......`;
export default function App() {
return (
<CodeMirror
value={yamlLang}
height="200px"
extensions={[StreamLanguage.define(yaml)]}
/>
);
} |
I am getting this error after adding any language extension:: |
Hi, just curious to know if there is a plan to upgrade this to CodeMirror 6.
Thanks for all the amazing stuff so far.
The text was updated successfully, but these errors were encountered: