"+s(o[2],!0)+"
";continue}if(o=this.rules.br.exec(e)){e=e.substring(o[0].length),t+=""+this.token.text+"
\n";case"table":var t="",n,r,i,o,u;t+="\n\n"+t+"\n";case"list_start":var a=this.token.ordered?"ol":"ul",t="";while(this.next().type!=="list_end")t+=this.tok();return"<"+a+">\n"+t+""+a+">\n";case"list_item_start":var t="";while(this.next().type!=="list_item_end")t+=this.token.type==="text"?this.parseText():this.tok();return"
"+this.inline.output(this.token.text)+"
\n";case"text":return""+this.parseText()+"
\n"}},u.exec=u,f.options=f.setOptions=function(e){return f.defaults=e,f},f.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,silent:!1,highlight:null},f.Parser=i,f.parser=i.parse,f.Lexer=t,f.lexer=t.lex,f.InlineLexer=r,f.inlineLexer=r.output,f.parse=f,typeof module!="undefined"?module.exports=f:typeof define=="function"&&define.amd?define(function(){return f}):this.marked=f}.call(function(){return this||(typeof window!="undefined"?window:global)}()); \ No newline at end of file + */(function(e,t){function n(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function r(e,t){for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])}function i(t,n){var r=t,i=null;return e.getComputedStyle?i=document.defaultView.getComputedStyle(r,null).getPropertyValue(n):r.currentStyle&&(i=r.currentStyle[n]),i}function s(e,t,n){var s={},o;if(t==="save"){for(o in n)n.hasOwnProperty(o)&&(s[o]=i(e,o));r(e,n)}else t==="apply"&&r(e,n);return s}function o(e){var t=parseInt(i(e,"border-left-width"),10)+parseInt(i(e,"border-right-width"),10),n=parseInt(i(e,"padding-left"),10)+parseInt(i(e,"padding-right"),10),r=e.offsetWidth,s;return isNaN(t)&&(t=0),s=t+n+r,s}function u(e){var t=parseInt(i(e,"border-top-width"),10)+parseInt(i(e,"border-bottom-width"),10),n=parseInt(i(e,"padding-top"),10)+parseInt(i(e,"padding-bottom"),10),r=e.offsetHeight,s;return isNaN(t)&&(t=0),s=t+n+r,s}function a(e,t,r){r=r||"";var i=t.getElementsByTagName("head")[0],s=t.createElement("link");n(s,{type:"text/css",id:r,rel:"stylesheet",href:e,name:e,media:"screen"}),i.appendChild(s)}function f(e,t,n){e.className=e.className.replace(t,n)}function l(e){return e.contentDocument||e.contentWindow.document}function c(e){var t;return typeof document.body.innerText=="string"?t=e.innerText:(t=e.innerHTML.replace(/"+s(o[2],!0)+"
";continue}if(o=this.rules.br.exec(e)){e=e.substring(o[0].length),t+=""+this.token.text+"
\n";case"table":var t="",n,r,i,o,u;t+="\n\n"+t+"\n";case"list_start":var a=this.token.ordered?"ol":"ul",t="";while(this.next().type!=="list_end")t+=this.tok();return"<"+a+">\n"+t+""+a+">\n";case"list_item_start":var t="";while(this.next().type!=="list_item_end")t+=this.token.type==="text"?this.parseText():this.tok();return"
"+this.inline.output(this.token.text)+"
\n";case"text":return""+this.parseText()+"
\n"}},u.exec=u,f.options=f.setOptions=function(e){return f.defaults=e,f},f.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,silent:!1,highlight:null},f.Parser=i,f.parser=i.parse,f.Lexer=t,f.lexer=t.lex,f.InlineLexer=r,f.inlineLexer=r.output,f.parse=f,typeof module!="undefined"?module.exports=f:typeof define=="function"&&define.amd?define(function(){return f}):this.marked=f}.call(function(){return this||(typeof window!="undefined"?window:global)}()); \ No newline at end of file diff --git a/src/editor.js b/src/editor.js index bd5dc0d..4db80ba 100644 --- a/src/editor.js +++ b/src/editor.js @@ -585,7 +585,7 @@ self.iframe.body.style.height = this.element.offsetHeight + 'px'; // Should actually check what mode it's in! - self.previewerIframe.style.left = '-9999999px'; + self.previewerIframe.style.left = '-999999px'; // FIXME figure out why it needs +2 px if (_isIE() > -1) { @@ -1157,7 +1157,7 @@ // Hide the editor and display the previewer if (!self.is('fullscreen')) { - self.editorIframe.style.left = '-9999999px'; + self.editorIframe.style.left = '-999999px'; self.previewerIframe.style.left = ''; self._eeState.preview = true; self._eeState.edit = false; @@ -1198,7 +1198,7 @@ self._eeState.preview = false; self._eeState.edit = true; self.editorIframe.style.left = ''; - self.previewerIframe.style.left = '-9999999px'; + self.previewerIframe.style.left = '-999999px'; self.editorIframe.focus(); self.emit('edit'); return this; diff --git a/test/test.edit.js b/test/test.edit.js index 4cdbec5..6b36eeb 100644 --- a/test/test.edit.js +++ b/test/test.edit.js @@ -36,7 +36,7 @@ describe('.edit()', function () { it('should make the editor visible when switching from preview back to edit', function () { editor.preview(); editor.edit(); - expect(editor.getElement('previewerIframe').style.left).to.be('-9999999px'); + expect(editor.getElement('previewerIframe').style.left).to.be('-999999px'); expect(editor.getElement('editorIframe').style.left).to.be(''); }); }); diff --git a/test/test.load.js b/test/test.load.js index f08d5a1..324cb97 100644 --- a/test/test.load.js +++ b/test/test.load.js @@ -66,17 +66,17 @@ describe(".load([callback])", function () { }); it('should initially load in editor mode', function () { - expect(editor.getElement('previewerIframe').style.left).to.be('-9999999px'); + expect(editor.getElement('previewerIframe').style.left).to.be('-999999px'); expect(editor.getElement('editorIframe').style.left).to.be(''); }); it('should open preview mode if preview mode was the last mode it was on before unloading', function () { editor.preview(); - expect(editor.getElement('editorIframe').style.left).to.be('-9999999px'); + expect(editor.getElement('editorIframe').style.left).to.be('-999999px'); expect(editor.getElement('previewerIframe').style.left).to.be(''); editor.unload(); editor.load(); - expect(editor.getElement('editorIframe').style.left).to.be('-9999999px'); + expect(editor.getElement('editorIframe').style.left).to.be('-999999px'); expect(editor.getElement('previewerIframe').style.left).to.be(''); }); }); diff --git a/test/test.preview.js b/test/test.preview.js index b2f67af..a405278 100644 --- a/test/test.preview.js +++ b/test/test.preview.js @@ -31,13 +31,13 @@ describe('.preview()', function () { }); it('should not initially be in previewer mode when loaded', function () { - expect(editor.getElement('previewerIframe').style.left).to.be('-9999999px'); + expect(editor.getElement('previewerIframe').style.left).to.be('-999999px'); }); it('should display the previewer when the preview method is called', function () { editor.preview(); expect(editor.getElement('previewerIframe').style.left).to.be(''); - expect(editor.getElement('editorIframe').style.left).to.be('-9999999px'); + expect(editor.getElement('editorIframe').style.left).to.be('-999999px'); }); it('should fire the preview event when the preview method is called', function () { @@ -48,7 +48,7 @@ describe('.preview()', function () { it('should hide the previewer if switched from preview back to edit', function () { editor.preview(); editor.edit(); - expect(editor.getElement('previewerIframe').style.left).to.be('-9999999px'); + expect(editor.getElement('previewerIframe').style.left).to.be('-999999px'); expect(editor.getElement('editorIframe').style.left).to.be(''); });