From 7618468df214233343a9c70017ef6402046536f8 Mon Sep 17 00:00:00 2001 From: joyqi Date: Mon, 4 Nov 2013 10:14:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=85=A8=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/editor-js.php | 11 +++++++++-- admin/js/markdown.js | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/admin/editor-js.php b/admin/editor-js.php index 495ef0ae..1a356645 100644 --- a/admin/editor-js.php +++ b/admin/editor-js.php @@ -131,17 +131,24 @@ $(document).ready(function () { editor.hooks.chain('enterFakeFullScreen', function () { th = textarea.height(); $(document.body).addClass('fullscreen'); - textarea.css('height', $(window).height() - toolbar.outerHeight()); + var h = $(window).height() - toolbar.outerHeight(); + + textarea.css('height', h); + preview.css('height', h); }); editor.hooks.chain('enterFullScreen', function () { $(document.body).addClass('fullscreen'); - textarea.css('height', window.screen.height - toolbar.outerHeight()); + + var h = window.screen.height - toolbar.outerHeight(); + textarea.css('height', h); + preview.css('height', h); }); editor.hooks.chain('exitFullScreen', function () { $(document.body).removeClass('fullscreen'); textarea.height(th); + preview.css('height', 'auto'); }); editor.run(); diff --git a/admin/js/markdown.js b/admin/js/markdown.js index 8d669c5e..b091ad7c 100644 --- a/admin/js/markdown.js +++ b/admin/js/markdown.js @@ -225,7 +225,7 @@ this.makeHtml = function(text) { return all; }); - if (text.indexOf('')) { + if (text.indexOf('') > 0) { var parts = text.split(/\s*<\!\-\-more\-\->\s*/), summary = parts.shift(), details = parts.join(''); @@ -5307,7 +5307,7 @@ else commandProto.doMore = function (chunk, postProcessing) { chunk.startTag = "\n\n"; chunk.selection = ""; - chunk.skipLines(2, 1, true); + chunk.skipLines(2, 0, true); } commandProto.doTab = function (chunk, postProcessing) {