Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                Im working on remaking the previous project due to continuous issues.
<!-- Input ID can be custom, just edit the textImageInput var to your selector -->
<textarea id="input" cols="30" rows="10" onchange="textImage(this.value)" onkeypress="this.onchange();" onpaste="this.onchange()" oninput="this.onchange();"></textarea>
<button id="convert" onclick="saveImage('Image/png')">Save as Image</button>
<!-- ID cannot be custom to set an output. -->
<canvas id="textImageOutput" style="border: 1px solid black" width="400" height="500"></canvas>




                var textImageInput = document.querySelector("#input");
var textICvs = document.querySelector('#textImageOutput');
var textICtx = textICvs.getContext('2d');

var textImage =a=> {
 textICreate('png', a);

var saveImage =a=> {
 var a = textICvs.toDataURL(a);
 var web ='about:blank', 'export');"display: inline-block;text-align:center;";
 web.document.write("<a href='"+a+"' download='textImage.png'><img src='"+a+"'></a><hr><h3>Click the image to download it. Enjoy.</h3>");

function textICreate(type, text) {
 console.log(textICtx + " | " + textICvs + " | " + text + " | " + type);
 textICtx.clearRect(0, 0, textICvs.width, textICvs.height);
 var textwidth = textICtx.measureText(text).width;
 textICvs.width = textwidth+12;
 textICtx.fillStyle = "white";
 textICtx.fillRect(0, 0, textICvs.width, textICvs.height);
 textICtx.fillStyle = "black";
 textICtx.font = "20px Helvetica, Arial, sans-serif";
 textICtx.fillText(text, 5, 20);
 if (type=='png') {
 } else if (type=='jpeg') {
 } else if (type=='webp') {
 } else {
  console.log(type + " | Sorry this type isnt Correct, Please use the Variable Functions instead!");