For questions regarding CodeMirror 6, the next generation of the CodeMirror in-browser editor. Use the more generic [codemirror] tag on all CodeMirror questions.
Questions tagged [codemirror-6]
22 questions
6
votes
0 answers
How to extend a theme in codemirror 6
I'm using the @codemirror/theme-one-dark theme with codemirror 6 and I'm trying to figure out how to extend the theme. I mostly just want to increase the font size… any ideas?

atomkirk
- 3,701
- 27
- 30
4
votes
1 answer
CodeMirror 6 React Wrapper?
I'm starting to use CodeMirror 6 (aka. next for the time being) in a React project.
In the past, I've used React CodeMirror 2 as a wrapper. Is there anything similar available for the upcoming version of CodeMirror?

Marc Polizzi
- 9,275
- 3
- 36
- 61
2
votes
1 answer
HTML slider sticks to the cursor inside CodeMirror 6 decoration
It looks like, that the element of CodeMirror 6 block the native events of mouseup event.
Once I click on a slider, it will never leave it. I cannot interact with anything
This slider is just a decoration inside the CodeMirror
The effect can be…

Kirill Vasin
- 143
- 7
2
votes
0 answers
I get the error "Unrecognized extension value in extension set ([object Object])." setting highlighting language using @codemirror/lang-javascript?
I'm trying to set a highlighting language for JavaScript in CodeMirror by importing @codemirror/lang-javascript and adding it to the extensions array, but I keep getting the error "Uncaught (in promise) Error: Unrecognized extension value in…

Rainb
- 1,965
- 11
- 32
2
votes
1 answer
Setup CodeMirror 6 with Angular 12
As I'm trying to setup a editor in codemirror v6 with angular but having difficulties in set up as it differs from previous v5.X. Need help in setting up codemirror basic editor with angular. Thank you.
import {EditorState, EditorView, basicSetup}…

Arpan Patnaik
- 41
- 5
1
vote
1 answer
Create placeholder when input is empty in CodeMirror 6
Anyone know how create placeholder when input is empty in CodeMirror 6, i search docs but nothing special about this basic function like it
I search something but i found only to version 5 not 6

Raxon
- 13
- 3
1
vote
0 answers
Yjs y-webrtc simple peer issue (Yjs + codemirror 6, sync content among editors)
I am using Yjs with codemirrow 6 in my project. I followed codemirror 6 examples and Yjs codemirror.next example (https://github.com/yjs/y-codemirror.next) in github.
And when I ran it, I got this error.
Here is the source.
Please help.
Any idea…

Charles
- 675
- 3
- 12
- 21
1
vote
0 answers
How to implement the merge view or diff view with codemirror 6
with codemirror version 5.x we have a demo for merge view on the website but I wanted the same feature with the code mirror version 6. any suggestion on how to achieve it. similar to this https://codemirror.net/5/demo/merge.html

Ramusesan
- 854
- 2
- 11
- 32
1
vote
2 answers
How to get the text value of a CodeMirror-6 editor
I'm playing with CodeMirror to check if I can use it in our site to allow the user to write c# scripts. I can made a sample easily but I can't find any documentation nabout to get the text value of the editor to send through a form post.
JS…

Marc
- 1,359
- 1
- 15
- 39
0
votes
0 answers
the codemirror6 did not show the code until focus that line
I am trying to use codemirror6 "codemirror": "^6.0.1", to implement an online collarborate editor. this is the the code to initial the codemirror:
import { EditorView } from "@codemirror/view";
import { WebsocketProvider } from "y-websocket";
import…

Dolphin
- 29,069
- 61
- 260
- 539
0
votes
0 answers
RollupError: "default" is not exported by "node_modules/simple-peer/simplepeer.min.js", imported by "node_modules/y-webrtc/src/y-webrtc.js"
I am building a CodeMirror-Yjs-editor. I followed the example in y-codemirror.next. But when I tried to rollup the JS, I got the error in the title.
I tried to change dependency version but still could not get it working. Please help.
Any help is…

Charles
- 675
- 3
- 12
- 21
0
votes
0 answers
Package path ./addon/hint/show-hint is not exported from package in codemirror
import React, { useState } from 'react';
import CodeMirror from '@uiw/react-codemirror';
import 'codemirror/addon/hint/show-hint';
const languageModes = [
{ name: 'javascript', json: true },
{ name: 'python', version: 3 },
{ name: 'ruby'…

AKhil kumar Singh
- 7
- 1
- 3
0
votes
0 answers
codemirror 6 detect deleted line with breakpoint to move the breakpoint to previous line
I follow this Gutters Example for toggle breakpoints. I want to move the breakpoint to line - 1 if the line with the breakpoint marker is deleted or empty.
The problem is I don't know how to detect if the line has been deleted or not, the set was…

Nam Tăng
- 13
- 3
0
votes
1 answer
How To Integrate HTMLHint into Codemirror 6
I'm trying to add HTMLHint into Codemirror 6 by following the lint documentation and the eslint-linter-browserify demo for Codemirror 6. Not sure what I'm doing wrong but the lints are not showing.
Can someone explain what I'm doing wrong and how…

Michael Schwartz
- 8,153
- 14
- 81
- 144
0
votes
0 answers
Unwanted element appear when using Decoration.replace (codemirror v6)
After using Decoration.replace, the generated html content contains a strange element
(
).
How to make this element not appear?
Please tell me any solution for my problem?
Thanks

Luan Nguyen
- 17
- 1
- 6