From 63ad960e4a8f51486dd25eb61c9c5b0f74cacd81 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Wed, 23 Mar 2022 08:33:15 +0430 Subject: wip --- spring-front/src/index.js | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) (limited to 'spring-front/src/index.js') diff --git a/spring-front/src/index.js b/spring-front/src/index.js index e6b507f..1b3e051 100644 --- a/spring-front/src/index.js +++ b/spring-front/src/index.js @@ -1,16 +1,37 @@ import React from "react"; import ReactDOM from "react-dom"; +import hljs from "highlight.js/lib/core"; +import markdown from "highlight.js/lib/languages/markdown"; +import "highlight.js/styles/devibeans.css"; -const page = ( -
-

my awesome website in react

-

REasons

-
    -
  1. one
  2. -
  3. two
  4. -
  5. three
  6. -
  7. four
  8. -
-
-); -ReactDOM.render(page, document.getElementById("root")); +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 ; +} + +function CreatePreCode() { + return ( + + ); +} + +function CreateRoot() { + return ( +
+

RTLMD ftw bebe!!!

+
+ ); +} + +ReactDOM.render(, document.getElementById("root2")); +ReactDOM.render(, document.getElementById("root2")); +ReactDOM.render(, document.getElementById("root")); -- cgit v1.2.3