Skip to content

Commit 67c16aa

Browse files
committed
add code editor
1 parent dc8faac commit 67c16aa

5 files changed

Lines changed: 207 additions & 46 deletions

File tree

package-lock.json

Lines changed: 86 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
},
3838
"type": "module",
3939
"dependencies": {
40+
"@codemirror/commands": "^6.10.0",
41+
"@codemirror/lang-python": "^6.2.1",
42+
"@codemirror/language": "^6.11.3",
43+
"@codemirror/state": "^6.5.2",
44+
"@codemirror/theme-one-dark": "^6.1.3",
45+
"@codemirror/view": "^6.38.6",
4046
"@ernane/svelte-star-rating": "^1.1.4",
4147
"@fullcalendar/common": "^5.11.5",
4248
"@microsoft/signalr": "^8.0.0",
@@ -59,6 +65,7 @@
5965
"overlayscrollbars-svelte": "^0.5.2",
6066
"qs": "^6.14.0",
6167
"svelte-awesome-color-picker": "^2.4.7",
68+
"svelte-codemirror-editor": "^1.4.1",
6269
"svelte-collapse": "^0.1.2",
6370
"svelte-file-dropzone": "^2.0.2",
6471
"svelte-flatpickr": "^3.3.3",

src/lib/scss/custom/pages/_agent.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,4 +273,17 @@
273273
&.show {
274274
opacity: 1 !important;
275275
}
276+
}
277+
278+
.code-editor {
279+
max-height: 500px;
280+
overflow-y: auto;
281+
scrollbar-width: thin;
282+
resize: none;
283+
284+
.cm-editor {
285+
min-width: 1000px;
286+
overflow-x: auto;
287+
scrollbar-width: thin;
288+
}
276289
}

0 commit comments

Comments
 (0)