jbilcke-hf HF staff commited on
Commit
ffd5ecd
1 Parent(s): ac4c3bc

add Monaco cheatsheet

Browse files
src/components/editors/ScriptEditor/README.md ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Monaco editor cheatsheet
2
+
3
+ ```typescript
4
+ // move the scroll:
5
+ editor.setScrollPosition({ scrollTop: horizontalTimelineRatio })
6
+
7
+ // Scroll to a specific line:
8
+ editor.revealLine(15);
9
+
10
+ // Scroll to a specific line so it ends in the center of the editor:
11
+ editor.revealLineInCenter(15);
12
+
13
+ // Move current active line:
14
+ editor.setPosition({column: 1, lineNumber: 3});
15
+ ```
16
+