Pen Settings

HTML

CSS

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <form>
  <h1 class="entypo-code"> FIND REPLACE</h1>
  <div>
    <textarea id="textarea" class="slide-down" placeholder="Paste your text here."></textarea>
  </div>
  <div>
    <div>
      <input class="slide-down" id="find" type="text" placeholder="Find this text..." />
      <input class="slide-down" id="replace" type="text" placeholder="Replace text with..." />
      <button class="entypo-right-thin slide-down" id="button" type="submit"></button>
    </div>
  </div> 
  <a href="#" class="entypo-cancel fade-in" id="clear" title="Clear text"></a>
  <div id="feedbox"><iframe width="355" height="185" frameborder="0" scrolling="no" src="https://anthonydalessio.wufoo.com/forms/feedback&header=hide"></iframe>
</div>
  <a href="#" id="feedback" class="entypo-comment fade-in" title="Feedback"></a>
</form>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Montserrat);
@import url(http://weloveiconfonts.com/api/?family=entypo);
[class*="entypo-"]:before {font-family: 'entypo', sans-serif;}
html, body {margin:5px;text-align:center;font-family:'Montserrat', sans-serif;background:#28A1D8;}

h1 {
  position:relative;
  font-weight:lighter;
  color:white;
  font-size:12px;
  line-height:30px;
  margin:0 0 2px 0;
  padding:0;
  letter-spacing:4px;
  
}
form {
  position:relative;
  display:block;
  margin:0 auto;
  margin-bottom:10px;
  width:411px;
  overflow:hidden;
  white-space:nowrap;
}
form textarea, form input[type="text"] {
  position:relative;
  background:#2991C6;
  outline:1px solid #37A9DD;
  font-size:12px;
  color:white;
  height:29px;
  line-height:29px;
  border-radius:2px;
  padding:0 5px 0 5px;
  margin:0;
  box-shadow:inset 0 0 2px #2885B5;
  border:none;
  transition:all 0.2s ease !important;
}
form #textarea {
  min-height:200px;
  max-height:500px;
  width:400px;
  resize:vertical; 
  line-height:15px;
  padding-top:5px;
}
form input[type="text"] {
  width:165px;
}
form textarea:focus,form input[type="text"]:focus {
}
form textarea::-webkit-input-placeholder, form input[type="text"]::-webkit-input-placeholder, form input[type="button"]::-webkit-input-placeholder {
  color:rgba(255,255,255,0.5);
}
form button {
  position:relative;
  outline:1px solid #2991C6;
  line-height:29px;
  font-size:12px;
  border-radius:2px;
  width:52px;
  background:#37A9DD;
  color:white;
  padding:0;
  margin:2px 0;
  box-shadow:inset 0 1px 1px rgba(255,255,255,0.3);
  text-shadow: 1px 1px 2px rgb(36, 149, 199);
  border:none;
  -webkit-appearance: none; 
}
form button:hover {cursor:pointer;}
form button:before {font-size:14px;}
form button:active {
  outline:rgba(255,255,255,0.3);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

#clear,#feedback {
  position:absolute;
  right:1px;
  top:6px;
  display:inline-block;
  background:#37A9DD;
  border:1px solid #2991C6;
  line-height:10px;
  width:10px;
  color:white;
  border-radius:2px;
  text-decoration:none;
  font-family:helvetica, sans-serif;
  font-size:12px;
  padding:5px;
  z-index:1;
}
#clear:hover, #feedback:hover, .feedback-active {background:white !important;color:#666 !important;}
.feedback-active {border-bottom:1px solid transparent !important;z-index:10 !important;}
#feedback {right:27px;}
#feedbox {
  background:white;
  width:355px;
  height:185px;
  position:absolute;
  top:26px;
  right:27px;
  border:1px solid #2991C6;
  display:none;
  box-shadow:0 2px 10px rgba(0,0,0,0.3);
  z-index:9;
}
.overlay {
  width:100%;
  height:100%;
  position:fixed;
  top:0;
  left:0;
  z-index:8;
}
#feedback a {color:white;text-decoration:none;}

.fade-in { -webkit-animation:fade 1.5s 1;}
.slide-down { -webkit-animation:slide 0.8s 1; transition:width 0.2s ease;}
#find.slide-down { -webkit-animation:slide 1.3s 1;}
#replace.slide-down { -webkit-animation:slide 1.6s 1;}
#button.slide-down { -webkit-animation:slide 1.9s 1;}

@-webkit-keyframes slide
{
  0%  {
    -webkit-transform:translateY(-100px);
    opacity:0;
  }
  100% {
    -webkit-transform:translateY(0);
    opacity:1;
  }
}
@-webkit-keyframes fade 
{
  0%  {
    opacity:0;
  }
  30%  {
    opacity:0;
  }
  100% {
    opacity:1;
  }
}
              
            
!

JS

              
                $('#button').click(function() {
  if($('#button').hasClass('selectall')) {
    $('#textarea').select();
    return false;
  }
  else {
    var findText = $('#find').val();
    var replaceText = $('#replace').val();
    var textArea = $('#textarea').val();
    var sRegExInput = new RegExp(findText, 'g');
    var textChange = textArea.replace(sRegExInput, replaceText);
    textArea = $('#textarea').val(textChange);
    $('#button').addClass('selectall').removeClass('entypo-right-thin').html('Select all').css('width','64px');
    $('#find, #replace').css('width','159px');
    $('#find, #replace').focus(function() {
      $('#button').removeClass('selectall').html('').addClass('entypo-right-thin').css('width','52px');
      $('#find, #replace').css('width','165px');
    });
  
    return false;
  }
});
$('#clear').click(function() {
    $('#textarea').val('');
    return false;
});

/* --- FEEDBACK --- */
$('#feedback').click(function() {
  $('form').append('<div class="overlay"></div>');
  $(this).addClass('feedback-active');
  $('#feedbox').show();
  $('.overlay').click(function() {
    $('#feedback').removeClass('feedback-active');
    $('#feedbox').hide();
    $('.overlay').remove();
  });
});


/* --- COOKIE SAVE --- */
window.setInterval(function(){
  cookieSave('textarea',$('#textarea').val());
  //cookieSave('textheight',$('#textarea').height());
}, 500);
$('#textarea').val(cookieLoad('textarea'));
//$('#textarea').css('height',cookieLoad('textheight')+'px');
// All the hard stuff
function cookieSave(name, k) {document.cookie = name + "=" + escape(k);}
function cookieLoad(name) {
  var search = name + "=";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search);
    if (offset != -1) {
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) {
        end = document.cookie.length;
      }
      return unescape(document.cookie.substring(offset, end));
    }
  }return '';
}
              
            
!
999px

Console