@lepture) * * @package Editor * @author 公子 * @version 1.0.2 * @link http://zh.eming.li/#typecho */ class Editor_Plugin implements Typecho_Plugin_Interface { /** * 插件版本号 * @var string */ const _VERSION = '1.0.2'; /** * 激活插件方法,如果激活失败,直接抛出异常 * * @access public * @return void * @throws Typecho_Plugin_Exception */ public static function activate() { Typecho_Plugin::factory('admin/write-post.php')->richEditor = array('Editor_Plugin', 'Change'); Typecho_Plugin::factory('admin/write-page.php')->richEditor = array('Editor_Plugin', 'Change'); } public static function Change() { $options = Helper::options(); $jsUrl = Typecho_Common::url('Editor/editor.js', $options->pluginUrl); $cssUrl = Typecho_Common::url('Editor/editor.css', $options->pluginUrl); ?>