From f14fdfc4e44117058d2eab9a802ea2d14fa40afa Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Sun, 26 Nov 2023 22:13:14 -0500 Subject: [PATCH] update code style --- frontend/src/App.tsx | 57 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index fe8dd1c..db07379 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -98,6 +98,49 @@ function App() { setAppState(AppState.CODE_READY); }; + function doOpenInCodepenio() { + const code = generatedCode; + + const form = document.createElement("form"); + form.setAttribute("method", "POST"); + form.setAttribute("action", "https://codepen.io/pen/define"); + form.setAttribute("target", "_blank"); // open in new window + + const data = { + html: code, + editors: "100", // 1:Open html, 0:close CSS, 0:Close Js + layout: "left", + css_external: + "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" + + (generatedCode.includes("