0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-22 08:58:11 +00:00

code folding

This commit is contained in:
Víctor Losada Hernández
2026-03-21 23:13:21 +01:00
parent 42e254c9c7
commit c18e8edd34
2 changed files with 17 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
import './codeEditor.less';
import React, { useEffect, useRef, forwardRef, useImperativeHandle } from "react"; import React, { useEffect, useRef, forwardRef, useImperativeHandle } from "react";
import { EditorState } from "@codemirror/state"; import { EditorState } from "@codemirror/state";

View File

@@ -18,11 +18,26 @@
.codeEditor { .codeEditor {
font-family: monospace; font-family: monospace;
height: 100%; height: 100%;
width:100%;
@media screen and (pointer: coarse) { @media screen and (pointer: coarse) {
font-size: 16px; font-size: 16px;
} }
.cm-scroller {
width:100%;
}
.cm-content {
width:70%;
.cm-line {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
}
/* Line numbers and gutters */ /* Line numbers and gutters */
.cm-gutters { .cm-gutters {
background-color: #f0f0f0; background-color: #f0f0f0;