From 840b1989b232b0cd7d9228b67b7250d120f2b6e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com>
Date: Sat, 20 Feb 2021 10:01:42 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/factory.php | 8 ++++----
core/function.php | 2 +-
typecho/editor/joe.owo.js | 9 ++-------
3 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/core/factory.php b/core/factory.php
index eb95e74..cda1fa6 100644
--- a/core/factory.php
+++ b/core/factory.php
@@ -9,10 +9,10 @@ class Editor
{
public static function edit()
{
- echo "";
- echo "";
- echo "";
- echo "";
+ echo "";
+ echo "";
+ echo "";
+ echo "";
}
}
diff --git a/core/function.php b/core/function.php
index 48927f4..7640866 100644
--- a/core/function.php
+++ b/core/function.php
@@ -3,7 +3,7 @@
/* 获取主题当前版本号 */
function _getVersion()
{
- return "5.2.5";
+ return "5.2.6";
};
/* 判断是否是手机 */
diff --git a/typecho/editor/joe.owo.js b/typecho/editor/joe.owo.js
index 15d1ea7..36bfc52 100644
--- a/typecho/editor/joe.owo.js
+++ b/typecho/editor/joe.owo.js
@@ -107,16 +107,11 @@ var JoeOwO = /*#__PURE__*/ (function () {
/* 点击表情,向文本框插入内容 */
var items = contain + ' .scroll .item';
- var textarea = $(this.options.target)[0];
+ var textarea = $(this.options.target);
$(items).on('click', function () {
- var text = $(this).attr('data-text');
- var cursorPos = textarea.selectionEnd;
- var areaValue = textarea.value;
- textarea.value = areaValue.slice(0, cursorPos) + text + areaValue.slice(cursorPos);
- textarea.focus();
+ textarea.insertContent($(this).attr('data-text'));
});
/* 默认激活第一个 */
-
$(barItem).first().click();
}
}