Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

Add todo comment (#60)

Sean Boult6b0354c022b3
diff --git a/src/components/challenge/editor/index.tsx b/src/components/challenge/editor/index.tsx
index 9b7d75d1..5304a3eb 100644
--- a/src/components/challenge/editor/index.tsx
+++ b/src/components/challenge/editor/index.tsx
@@ -134,8 +134,10 @@ export const CodePanel = ({ challenge }: Props) => {
onError(hasErrors);
};
+ // TODO: we prolly should use this for blocking ranges as it might not be as janky
+ // https://github.com/Pranomvignesh/constrained-editor-plugin
model.onDidChangeContent((e) => {
- // in monaco editor, the first line is e1e1e
+ // in monaco editor, the first line is e1e1e
// do net let them type if they are editing before lineWithUserCode
if (e.changes.some((c) => c.range.startLineNumber <= (lineWithUserCode + 1))) {
editor.trigger('someIdString', 'undo', null);