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