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);

- -
diff --git a/admin/write-post.php b/admin/write-post.php index 0e85323c..a4497a63 100644 --- a/admin/write-post.php +++ b/admin/write-post.php @@ -27,21 +27,6 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);

-

- bolditaliclinkquotedelimguloltitlecodepremorehr -

@@ -57,7 +42,6 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);

-
diff --git a/var/Typecho/Common.php b/var/Typecho/Common.php index 939308eb..4cf54feb 100644 --- a/var/Typecho/Common.php +++ b/var/Typecho/Common.php @@ -20,7 +20,7 @@ class Typecho_Common { /** 程序版本 */ - const VERSION = '0.9/13.10.8'; + const VERSION = '0.9/13.10.18'; /** * 缓存的包含路径 diff --git a/var/Widget/Users/Profile.php b/var/Widget/Users/Profile.php index 29856ff7..0ec9f9c6 100644 --- a/var/Widget/Users/Profile.php +++ b/var/Widget/Users/Profile.php @@ -271,7 +271,7 @@ class Widget_Users_Profile extends Widget_Users_Edit implements Widget_Interface public function updateOptions() { $settings['autoSave'] = $this->request->autoSave ? 1 : 0; - //$settings['useRichEditor'] = $this->request->useRichEditor; + $settings['markdown'] = $this->request->markdown ? 1 : 0; $settings['defaultAllowComment'] = is_array($this->request->defaultAllow) && in_array('comment', $this->request->defaultAllow) ? 1 : 0;