added line wrapping
mellobacon committed
Aug 23, 2022 at 19:23 UTC
136ce0d6fe235c880ea2bcd148c65eb637163002
1 file changed
+3
-3
src/components/Content/Editor/CodeMirrorEditor.svelte
+3
-3
@@ -16,12 +16,11 @@
16
onMount(() => {
17
editorView = new EditorView({
18
state: EditorState.create({
19
- extensions: [basicSetup, default_theme, keymap.of([indentWithTab])],
19
+ extensions: [basicSetup, default_theme, keymap.of([indentWithTab]), EditorView.lineWrapping],
20
doc: content
21
}),
22
parent: editorElement,
23
});
24
-
24
});
25
</script>
26
<div class="editor" class:hidden bind:this={editorElement} on:input={async () => {
@@ -50,7 +49,8 @@
49
height: 100%;
50
}
51
:global(.cm-scroller) {
53
- overflow: auto;
52
+ overflow-y: overlay;
53
+ overflow-x: hidden;
54
}
55
:global(.cm-scroller)::-webkit-scrollbar {
56
width: 20px;