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.


                <h1 class="h5 mb-3">Flmngr 2: edit and save image</h1>

  <img id="image" style="max-width:500px" src="" alt="Some image">

<div id="btn" class="btn btn-primary" style="opacity:0.2;cursor:default">Edit image...</div>
<div id="loading" style="font-size:12px">Loading file manager...</div>

<script src=""></script>
<script src=""></script>


                body {
  padding: 20px;
  background-color: #F4F4F4;

#images {
  .image {
    border: 1px solid #DDD;
    box-shadow: 5px 5px 0 0 #DDD;
    background-color: white;
    padding: 10px;
    display: inline-flex;
    flex-direction: column;
    margin: 0 25px 25px 0;
    img {
      max-height: 350px;
      border: 1px solid #DDD;
    p {
      margin: 5px 0 0 0;
      font-size: 14px;
      color: #444;

@-webkit-keyframes loading-animation {
  50% {opacity: 0.3;}

@keyframes loading-animation {
  50% {opacity: 0.3;}

.loading {
  animation: loading-animation 1s infinite;


                window.onFlmngrAndImgPenLoaded = function() {
  var elBtn = document.getElementById("btn");
  // Style button as ready to be pressed = 1; = "pointer";
  var elLoading = document.getElementById("loading");
  // Add a listener for editing currently shown image
  elBtn.addEventListener("click", function() {

function editImage() {
  // Create an instance object of flmngr, can be reused
  let flmngr = window.flmngr.create({
    urlFileManager: '',
    urlFiles: ''
    url: decodeURI(document.getElementById("image").getAttribute("src")),
    onSave: function(urlNew) {
      // Image edited, saved and uploaded to server: change the image
      // `getNoCacheUrl` will add `?no-cache=time` parameter to force image reloading in the browser
      var elImg = document.getElementById("image");
      elImg.setAttribute("src", flmngr.getNoCacheUrl(urlNew));
    onFail: function(error) {
      alert("Error: " + error);

// Just for animating image while it is being reloading after change
function animateLoading() {
  var elImg = document.getElementById("image");
  var onLoaded = function() {
    elImg.removeEventListener("click", onLoaded);
  elImg.addEventListener("load", onLoaded);