code: function () {
  
          var value = editor.getValue();
  
          if ( validate( value ) ) {
  
              // remove previous iframe
  
              if ( preview.children.length > 0 ) {
  
                  preview.removeChild( preview.firstChild );
  
              }
  
              //
  
              var iframe = document.createElement( 'iframe' );
              iframe.style.width = '100%';
              iframe.style.height = '100%';
              iframe.style.border = '0';
              preview.appendChild( iframe );
  
              var content = iframe.contentDocument || iframe.contentWindow.document;
  
              // workaround for chrome bug
              // http://code.google.com/p/chromium/issues/detail?id=35980#c12
  
              value = value.replace( '<script>', '<script>if ( window.innerWidth === 0 ) { window.innerWidth = parent.innerWidth; window.innerHeight = parent.innerHeight; }' );
  
              content.open();
              content.write( value );
              content.close();
  
          }
  
      }
docs: actions