更新
This commit is contained in:
parent
92889ef834
commit
4631aab53b
@ -2,7 +2,7 @@
|
||||
/* 获取主题当前版本号 */
|
||||
function _getVersion()
|
||||
{
|
||||
return "6.3.8";
|
||||
return "6.3.9";
|
||||
};
|
||||
|
||||
/* 判断是否是手机 */
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "typecho-joe-next",
|
||||
"version": "6.3.8",
|
||||
"version": "6.3.9",
|
||||
"description": "A Theme Of Typecho",
|
||||
"main": "index.php",
|
||||
"keywords": [
|
||||
|
@ -471,4 +471,9 @@ export default class JoeAction {
|
||||
}
|
||||
});
|
||||
}
|
||||
handleHtml(cm) {
|
||||
const str = `${this._getLineCh(cm) ? '\n' : ''}!!!\n<p align="center">居中</p>\n<p align="right">居右</p>\n<font size="5" color="red">颜色大小</font>\n!!!\n`;
|
||||
this._replaceSelection(cm, str);
|
||||
cm.focus();
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +89,11 @@ export default [
|
||||
title: '代码块',
|
||||
innerHTML: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M902.4 454.4l-144-144a40.704 40.704 0 0 0-57.6 57.6l144 144-144 144a40.704 40.704 0 0 0 57.6 57.6l144-144a81.472 81.472 0 0 0 0-115.2zm-636.8-144l-144 144a81.472 81.472 0 0 0 0 115.2l144 144a40.704 40.704 0 0 0 57.6-57.6l-144-144 144-144a40.704 40.704 0 0 0-57.6-57.6zm109.568 544.064l195.072-706.56a40.704 40.704 0 0 1 78.528 21.632l-195.072 706.56a40.704 40.704 0 0 1-78.528-21.696z" /></svg>'
|
||||
},
|
||||
{
|
||||
type: 'html',
|
||||
title: '原生HTML',
|
||||
innerHTML: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M128 64l69.8 791.6L511 960l315.2-104.4L896 64H128zm616.4 255.8H376.8l8.2 98.8h351.2L709 715.4l-195.8 54v.6H511l-197.4-54.6-12-151.6H397l7 76.2 107 29 107.4-29 12-124.4H296.6L271 224.4h482.2l-8.8 95.4z"/></svg>'
|
||||
},
|
||||
{
|
||||
type: 'expression',
|
||||
title: '图片表情',
|
||||
|
@ -652,18 +652,16 @@
|
||||
|
||||
Parser.prototype.parseBlockShtml = function (block, key, line, state) {
|
||||
var matches;
|
||||
if (this.html) {
|
||||
if (!!(matches = line.match(/^(\s*)!!!(\s*)$/))) {
|
||||
if (this.isBlock('shtml')) {
|
||||
this.setBlock(key).endBlock();
|
||||
} else {
|
||||
this.startBlock('shtml', key);
|
||||
}
|
||||
return false;
|
||||
} else if (this.isBlock('shtml')) {
|
||||
this.setBlock(key);
|
||||
return false;
|
||||
if (!!(matches = line.match(/^(\s*)!!!(\s*)$/))) {
|
||||
if (this.isBlock('shtml')) {
|
||||
this.setBlock(key).endBlock();
|
||||
} else {
|
||||
this.startBlock('shtml', key);
|
||||
}
|
||||
return false;
|
||||
} else if (this.isBlock('shtml')) {
|
||||
this.setBlock(key);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
2
typecho/write/js/joe.parse.min.js
vendored
2
typecho/write/js/joe.parse.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -277,6 +277,9 @@ class Joe extends JoeAction {
|
||||
case 'mtitle':
|
||||
super.handleMtitle(this.cm);
|
||||
break;
|
||||
case 'html':
|
||||
super.handleHtml(this.cm);
|
||||
break;
|
||||
}
|
||||
});
|
||||
$('.cm-tools').append(el);
|
||||
|
Loading…
Reference in New Issue
Block a user