1,232 questions
0
votes
0
answers
39
views
Codemirror : scriban syntax highlighting parser with lezer grammar
I need to write a simple parser for the scribal template language. There's nothing complicated at this stage; I just need to identify the code inside {{}} as code and somehow highlight it. This needs ...
0
votes
0
answers
41
views
Obsidian plugin: How to suppress editor actions (like Enter inserting newline) in custom input mode?
I'm writing an Obsidian plugin that activates a custom "find mode". While in this mode, I listen to keydown events at the document level, and I want to capture keys like Enter, Escape, ...
0
votes
0
answers
37
views
Name label in yjs code-mirror editor taking full width
I am trying to implement the collaborative code-editor, using yjs and code mirror, here the problem i am facing is the name label of the editor it takes full width, this makes the text to shift to ...
0
votes
0
answers
80
views
Ngx-Editor + CodeMirror: "Invalid change range" error when typing after completely clearing its content
I'm using ngx-editor with prosemirror-codemirror-6 in an Angular project to add a code_mirror node. The editor works fine, but when I press Typing continuously inside a code_mirror block, I get the ...
1
vote
0
answers
116
views
How can I extract the complete content from a CodeMirror editor using the browser console?
I'm trying to extract the full code from a CodeMirror editor on chatgpt.com using the browser console. My current approach only retrieves the visible portion of the code, likely because CodeMirror is ...
0
votes
3
answers
234
views
Ligatures does not show up in codemirror editor using font that supports them
I'm using the latest version of Codemirror. From my package.json:
"codemirror": "^6.0.1",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/lang-sql": &...
0
votes
1
answer
98
views
react-codemirror: Cannot get the same CSS color style as shown on https://uiwjs.github.io/react-codemirror/
I want to get the same color CSS styling as shown on https://uiwjs.github.io/react-codemirror/ for theme: dark and language: JSON
But when I tried it with react-codemirror ("@uiw/react-...
2
votes
1
answer
45
views
CodeMirror Vim Extension clear command, search history
I am using react, and set up CodeMirror with Vim extension, I just want reset the editor to its original state, no command or search history.
const {setContainer,view} = useCodeMirror({
container:...
2
votes
0
answers
308
views
How to properly close pywebview window from a button?
How to properly close pywebview window from a button?
I put together this demo of a Python Code Editor using pywebview and codemirror.
It runs fine; However, when I use a button to close the window ...
1
vote
0
answers
95
views
How to achieve advanced autocompletion in React CodeMirror?
I'm trying to implement a code editor on my react site, I need to implement a pretty good autocompletion for Python. I ran into a problem, which is that I haven't figured out how to add some ready-...
0
votes
1
answer
77
views
CodeMirror Merge - Calling a Function on Chunk Approval/Reject
I am using CodeMirror 6, and the @codemirror/merge package. So far I've gotten everything UI related working. However, I can not figure out how to trigger a function when the user has either approved ...
1
vote
1
answer
124
views
Codemirror x86 assembly (Intel) syntax
I'm building an assembly emulator with the x86 syntax. I noticed there is an option for AT&T assembly here.
Is there any know options to support the x86 intel assembly syntax?
-1
votes
1
answer
224
views
Can someone please help me enable code folding using react-codemirror2? [closed]
My web app is currently using react-codemirror2 to display JSON data. Unfortunately the JSON files get so huge that scrolling through the data becomes a problem. I want to implement code folding to ...
1
vote
0
answers
130
views
EasyMDE / Codemirrror "blur" event
I would like to have an event "on edit finished" when the user leaves the easyMDE editor. I have added a "blur" event, the problem is that it is also fired when the user clicks on ...
-1
votes
1
answer
164
views
Not able to pass the value in `@uiw/react-codemirror` component to the `useState` hook [duplicate]
A very simple example:
import React from "react";
import CodeMirror from '@uiw/react-codemirror';
import { javascript } from '@codemirror/lang-javascript';
export default function Test() {
...