"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([["3142"],{4609:function(e,n,r){r.r(n),r.d(n,{default:()=>u,frontMatter:()=>o,metadata:()=>t,assets:()=>l,toc:()=>c,contentTitle:()=>d});var t=JSON.parse('{"id":"api/functions/getPlaygroundUrl","title":"Function: getPlaygroundUrl()","description":"getPlaygroundUrl(options): string","source":"@site/docs/api/functions/getPlaygroundUrl.md","sourceDirName":"api/functions","slug":"/api/functions/getPlaygroundUrl","permalink":"/docs/api/functions/getPlaygroundUrl","draft":false,"unlisted":false,"editUrl":"https://github.com/live-codes/livecodes/tree/develop/docs/docs/api/functions/getPlaygroundUrl.md","tags":[],"version":"current","frontMatter":{}}'),s=r("5893"),i=r("65");let o={},d="Function: getPlaygroundUrl()",l={},c=[{value:"Parameters",id:"parameters",level:2},{value:"Returns",id:"returns",level:2},{value:"Defined in",id:"defined-in",level:2}];function a(e){let n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"function-getplaygroundurl",children:"Function: getPlaygroundUrl()"})}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"getPlaygroundUrl"}),"(",(0,s.jsx)(n.code,{children:"options"}),"): ",(0,s.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Gets the URL to a LiveCodes playground (as a string) from the provided ",(0,s.jsx)(n.a,{href:"https://livecodes.io/docs/sdk/js-ts#embed-options",children:"options"}),".\nThis can be useful for providing links to run code in playgrounds."]}),"\n",(0,s.jsx)(n.h2,{id:"parameters",children:"Parameters"}),"\n",(0,s.jsxs)(n.p,{children:["\u2022 ",(0,s.jsx)(n.strong,{children:"options"}),": ",(0,s.jsx)(n.a,{href:"/docs/api/interfaces/EmbedOptions",children:(0,s.jsx)(n.code,{children:"EmbedOptions"})})," = ",(0,s.jsx)(n.code,{children:"{}"})]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"https://livecodes.io/docs/sdk/js-ts#embed-options",children:"options"})," for the playground."]}),"\n",(0,s.jsx)(n.h2,{id:"returns",children:"Returns"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"string"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The URL of the playground (as a string)."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"large objects like config and params are store in the url hash params while the rest are in the search params\nunless config is a string in which case it is stored in searchParams"}),"\n",(0,s.jsx)(n.h2,{id:"defined-in",children:"Defined in"}),"\n",(0,s.jsx)(n.p,{children:"index.ts:389"})]})}function u(e={}){let{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},65:function(e,n,r){r.d(n,{Z:function(){return d},a:function(){return o}});var t=r(7294);let s={},i=t.createContext(s);function o(e){let n=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]);