diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 4c843d6..e449b7c 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -97,6 +97,45 @@ function App() { setAppState(AppState.CODE_READY); }; + function doOpenInCodepenio(){ + const code = generatedCode + + var 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('