We want you to be able to flexibly build with Ycode. That’s why you can add any piece of code via HTML embed. This gives you the power to use custom functionality on your web apps and websites.
Adding an embedded element
Before you start, it’s good to know that there’s a maximum of 10,000 characters for embedded code.
If your code happens to be longer, it’s best to store it on an external server and embed it as a script file. Alternatively, you can use multiple embed code elements (if the Javascript functions allow it).
Adding any <html></html>
, <body></body>
or <head></head>
tags will break your web project.
And lastly, if your embed code has opening and closing tags, make sure to add them in there.
Here’s how to embed custom code:
Copy the embeddable code to your clipboard
Add an embed element from the Top panel
Paste your copied custom code
Done! Your custom code will be automatically saved
Editing an embedded element
Though there’s probably not much to edit in your custom HTML embed code, you can add your own dimensions (in case there are none set). Add [height="100%" width="100%"]
and change the percentages accordingly.
If your HTML has the tags <iframe></iframe>
or <style></style>
, you can preview the embedded code directly in your canvas. However, some code can only be seen in the live version of your web project. Once your project is published, the custom code will render where you placed it.