diff --git a/core/factory.php b/core/factory.php index 2e0fcff..974abc3 100644 --- a/core/factory.php +++ b/core/factory.php @@ -31,8 +31,10 @@ class Intercept } /* 加强后台编辑器功能 */ -Typecho_Plugin::factory('admin/write-post.php')->richEditor = array('Editor', 'Edit'); -Typecho_Plugin::factory('admin/write-page.php')->richEditor = array('Editor', 'Edit'); +if (Helper::options()->JEditor !== 'off') { + Typecho_Plugin::factory('admin/write-post.php')->richEditor = array('Editor', 'Edit'); + Typecho_Plugin::factory('admin/write-page.php')->richEditor = array('Editor', 'Edit'); +} class Editor { diff --git a/core/function.php b/core/function.php index 61fb4b9..020eaea 100644 --- a/core/function.php +++ b/core/function.php @@ -2,7 +2,7 @@ /* 获取主题当前版本号 */ function _getVersion() { - return "6.0.8"; + return "6.0.9"; }; /* 判断是否是手机 */ diff --git a/functions.php b/functions.php index fc7a321..ad497a0 100644 --- a/functions.php +++ b/functions.php @@ -894,4 +894,18 @@ function themeConfig($form) ); $JOverdue->setAttribute('class', 'joe_content joe_post'); $form->addInput($JOverdue->multiMode()); + + $JEditor = new Typecho_Widget_Helper_Form_Element_Select( + 'JEditor', + array( + 'on' => '开启(默认)', + 'off' => '关闭', + ), + 'on', + '是否启用Joe自定义编辑器', + '介绍:开启后,文章编辑器将替换成Joe编辑器
+ 其他:目前编辑器处于拓展阶段,如果想继续使用原生编辑器,关闭此项即可' + ); + $JEditor->setAttribute('class', 'joe_content joe_post'); + $form->addInput($JEditor->multiMode()); } ?> \ No newline at end of file diff --git a/package.json b/package.json index 2396145..58ecaa5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typecho-joe-next", - "version": "6.0.8", + "version": "6.0.9", "description": "A Theme Of Typecho", "main": "index.php", "keywords": [