Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

+ 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.


Save Automatically?

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.


                <h1>Drag & Drop file(s) to embed in SUKIYAKI picture</h1>


                img {
    display: block;

a {
    text-decoration: none;

a:hover {
    opacity: .5;



                import dragAndDrop             from '/tsmallfield/pen/MWEoByX.js';
import fileToArrayBuffer       from '/tsmallfield/pen/MWEoBjB.js';
import embedByteLength         from '/tsmallfield/pen/OJxgwXW.js';
import imageToPixelArrayBuffer from '/tsmallfield/pen/XWegBNo.js';
import loadImage               from '/tsmallfield/pen/dyVRjNP.js';
import calcImageSize           from '/tsmallfield/pen/OJxgwNW.js';
import embedDataInPixels       from '/tsmallfield/pen/rNGwrLQ.js';
import arrayBufferToPNGBlob    from '/tsmallfield/pen/NWagBxv.js';
import test                    from '/tsmallfield/pen/NWagBda.js';
import sukiyakiPicture         from '/tsmallfield/pen/eYGBMdZ.js';

dragAndDrop(files => files.forEach(async file => {
    const src  = await fileToArrayBuffer(file);
    const data = embedByteLength(src);
    const img  = await loadImage(sukiyakiPicture);
    const { width, height } = calcImageSize(
        img.width / img.height
    const pixels = imageToPixelArrayBuffer(img, width, height);
    const result = embedDataInPixels(data, pixels);
    const blob   = await arrayBufferToPNGBlob(result, width, height);
    const url    = URL.createObjectURL(blob);
    const a      = document.createElement('a');
    const name   = `${}.png`; = name;
    a.href = url;
    a.appendChild(await loadImage(url));
    a.appendChild(document.createTextNode(`Click to Download ${name}`));
    test(name, url, src);