From e6697248acad24e0171ed7f31a3d40565b461d4c Mon Sep 17 00:00:00 2001 From: joyqi Date: Fri, 18 Oct 2013 15:44:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7markdown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/js/markdown.js | 2 +- admin/write-js.php | 49 ++++++++++++++++++++++++++++++++++++ admin/write-page.php | 2 -- admin/write-post.php | 16 ------------ var/Typecho/Common.php | 2 +- var/Widget/Users/Profile.php | 2 +- 6 files changed, 52 insertions(+), 21 deletions(-) diff --git a/admin/js/markdown.js b/admin/js/markdown.js index 35413378..0ebed704 100644 --- a/admin/js/markdown.js +++ b/admin/js/markdown.js @@ -3314,7 +3314,7 @@ else function PanelCollection(postfix) { this.buttonBar = doc.getElementById("wmd-button-bar" + postfix); this.preview = doc.getElementById("wmd-preview" + postfix); - this.input = doc.getElementById("wmd-input" + postfix); + this.input = doc.getElementById("text"); }; // Returns true if the DOM element is visible, false if it's hidden. diff --git a/admin/write-js.php b/admin/write-js.php index 87a74f56..9d1ef9ca 100644 --- a/admin/write-js.php +++ b/admin/write-js.php @@ -156,4 +156,53 @@ $(document).ready(function() { }); +markdown && (!$content->have() || $content->isMarkdown)): ?> + + + diff --git a/admin/write-page.php b/admin/write-page.php index 8037c0c0..5e03700d 100644 --- a/admin/write-page.php +++ b/admin/write-page.php @@ -41,8 +41,6 @@ Typecho_Widget::widget('Widget_Contents_Page_Edit')->to($page);
- bolditaliclinkquotedelimguloltitlecodepremorehr -
text); ?> @@ -57,7 +42,6 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);