aboutsummaryrefslogtreecommitdiffstats
path: root/spring-front
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-03-31 13:28:41 +0000
committerterminaldweller <thabogre@gmail.com>2022-03-31 13:28:41 +0000
commit40bb640b169656dd33b15c189eb4146e05118ecd (patch)
tree333925f838d12ca4a676e16639691f38919cbdb4 /spring-front
parentwip (diff)
downloadmdrtl-40bb640b169656dd33b15c189eb4146e05118ecd.tar.gz
mdrtl-40bb640b169656dd33b15c189eb4146e05118ecd.zip
moved everything into one class
Diffstat (limited to 'spring-front')
-rw-r--r--spring-front/src/App.js6
-rw-r--r--spring-front/src/components/Editor.js (renamed from spring-front/src/components/Left.js)41
-rw-r--r--spring-front/src/components/Right.js17
3 files changed, 25 insertions, 39 deletions
diff --git a/spring-front/src/App.js b/spring-front/src/App.js
index 492930e..e965d51 100644
--- a/spring-front/src/App.js
+++ b/spring-front/src/App.js
@@ -1,6 +1,5 @@
import React from "react";
-import Left from "./components/Left.js";
-import Right from "./components/Right.js";
+import Editor from "./components/Editor.js";
export default class App extends React.Component {
constructor(props) {
@@ -10,8 +9,7 @@ export default class App extends React.Component {
render() {
return (
<div>
- <Left />
- <Right />
+ <Editor />
</div>
);
}
diff --git a/spring-front/src/components/Left.js b/spring-front/src/components/Editor.js
index dc1bbd5..330f15c 100644
--- a/spring-front/src/components/Left.js
+++ b/spring-front/src/components/Editor.js
@@ -65,25 +65,30 @@ export default class Editor extends React.Component {
render() {
return (
<div>
- <pre id="highlight" aria-hidden="true" direction="rtl">
- <code
- id="highlight-content"
- class="language-markdown"
+ <div>
+ <pre id="highlight" aria-hidden="true" direction="rtl">
+ <code
+ id="highlight-content"
+ class="language-markdown"
+ direction="rtl"
+ ></code>
+ </pre>
+ <textarea
+ spellcheck="false"
+ name="editor"
+ className="editor"
+ id="editor"
+ value={this.state.value}
+ onChange={this.handleChange.bind(this)}
+ onInput={this.handleInput.bind(this)}
+ onScroll={this.handleScroll.bind(this)}
+ onKeyDown={this.handleKeyDown.bind(this)}
direction="rtl"
- ></code>
- </pre>
- <textarea
- spellcheck="false"
- name="editor"
- className="editor"
- id="editor"
- value={this.state.value}
- onChange={this.handleChange.bind(this)}
- onInput={this.handleInput.bind(this)}
- onScroll={this.handleScroll.bind(this)}
- onKeyDown={this.handleKeyDown.bind(this)}
- direction="rtl"
- ></textarea>
+ ></textarea>
+ </div>
+ <div class="split right">
+ <p class="markdown-placeholder">Parsed Markdown goes here!!!</p>
+ </div>
</div>
);
}
diff --git a/spring-front/src/components/Right.js b/spring-front/src/components/Right.js
deleted file mode 100644
index 4bfe073..0000000
--- a/spring-front/src/components/Right.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import React from "react";
-import "../index.css";
-
-export default class Right extends React.Component {
- constructor(props) {
- super(props);
- this.state = { value: "" };
- }
-
- render() {
- return (
- <div class="split right">
- <p class="markdown-placeholder">Parsed Markdown goes here!!!</p>
- </div>
- );
- }
-}