diff options
Diffstat (limited to 'spring-front/src/components')
| -rw-r--r-- | spring-front/src/components/.Left.js.swp | bin | 0 -> 12288 bytes | |||
| -rw-r--r-- | spring-front/src/components/.Right.js.swp | bin | 0 -> 12288 bytes | |||
| -rw-r--r-- | spring-front/src/components/Left.js | 34 | ||||
| -rw-r--r-- | spring-front/src/components/Right.js | 6 | 
4 files changed, 40 insertions, 0 deletions
| diff --git a/spring-front/src/components/.Left.js.swp b/spring-front/src/components/.Left.js.swpBinary files differ new file mode 100644 index 0000000..64301a2 --- /dev/null +++ b/spring-front/src/components/.Left.js.swp diff --git a/spring-front/src/components/.Right.js.swp b/spring-front/src/components/.Right.js.swpBinary files differ new file mode 100644 index 0000000..8f6b495 --- /dev/null +++ b/spring-front/src/components/.Right.js.swp diff --git a/spring-front/src/components/Left.js b/spring-front/src/components/Left.js new file mode 100644 index 0000000..7abeed4 --- /dev/null +++ b/spring-front/src/components/Left.js @@ -0,0 +1,34 @@ +import React from "react"; +import hljs from "highlight.js/lib/core"; +import markdown from "highlight.js/lib/languages/markdown"; +import "highlight.js/styles/devibeans.css"; +import "../index.css"; + +hljs.registerLanguage("markdown", markdown); + +function update(text) { +  let result_element = document.querySelector("#highlight-content"); +  result_element.innerText = text; +  return hljs.highlight(text, { language: "markdown" }).value; +} + +function CreateTextArea() { +  return <textarea name="editor" className="editor" id="editor"></textarea>; +} + +function CreatePreCode() { +  return ( +    <pre id="highlight" aria-hidden="true"> +      <code className="language-markdown" id="highlight-content"></code> +    </pre> +  ); +} + +export default function Left() { +  return ( +    <div> +      <CreateTextArea /> +      <CreatePreCode /> +    </div> +  ); +} diff --git a/spring-front/src/components/Right.js b/spring-front/src/components/Right.js new file mode 100644 index 0000000..7206ae9 --- /dev/null +++ b/spring-front/src/components/Right.js @@ -0,0 +1,6 @@ +import React from "react"; +import "../index.css"; + +export default function Right() { +  return <div>Parsed Markdown goes here!!!</div>; +} | 
