-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
68 lines (61 loc) · 1.74 KB
/
Copy pathApp.js
File metadata and controls
68 lines (61 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import React from "react";
import {useEffect,useState,useReducer} from "react";
import MonacoEditor from "react-monaco-editor";
import PatternGen from './PatternGen';
import RegexReplace from "./RegexReplace"
import Main from "./Main"
import Dashboard from "./Dashboard"
const example_text = `
Minimal set for phonemic tone in Mandarin Chinese
Tone number 1 2 3 4 5
Hanzi 媽 麻 馬 罵 嗎
Pinyin mā má mǎ mà ma
IPA [má] [mǎ] [mà][a] [mâ] [ma]
Gloss mother hemp horse scold question particle
`
const options = {
selectOnLineNumbers: true,
roundedSelection: false,
readOnly: false,
cursorStyle: "line",
automaticLayout: false,
};
let onChange= (newValue, e) =>{
console.log('onChange', newValue, e);
}
const App = () => {
let [theme,setTheme] = useState(false)
let [editor,setEditor] = useState(null)
let monacoEditorLoaded = (__editor__, monaco)=>{
console.log("__Editor__ loaded")
__editor__.focus();
setEditor(__editor__)
}
return (
<Dashboard />
// <div>
// <h2>Text Processor v1 (Alpha) by [Oran C 2021]</h2>
// <div>
// <button onClick={()=>{
// setTheme(!theme)
// }}>Theme Dark/Light</button>
// </div>
// <MonacoEditor
// height="400"
// width="800"
// language="javascript"
// value={example_text}
// options={options}
// onChange={onChange}
// editorDidMount={monacoEditorLoaded}
// theme={theme ?"vs-light":"vs-dark"}
// />
// <div>
// <RegexReplace editor={editor}/>
// <hr />
// <PatternGen editor={editor}/>
// </div>
// </div>
)
}
export default App;