mirror of
https://dl.bcrjl.com/ghg/HaoOuBa/Joe.git
synced 2026-02-17 13:10:05 +08:00
更新
This commit is contained in:
2
typecho/write/css/joe.write.min.css
vendored
2
typecho/write/css/joe.write.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -735,6 +735,11 @@ export default class JoeAction {
|
||||
this._replaceSelection(cm, str);
|
||||
cm.focus();
|
||||
}
|
||||
handleCardDescribe(cm) {
|
||||
const str = `${this._getLineCh(cm) ? '\n\n' : '\n'}{card-describe title="卡片描述"}\n卡片内容\n{/card-describe}\n\n`;
|
||||
this._replaceSelection(cm, str);
|
||||
cm.focus();
|
||||
}
|
||||
handleCopy(cm) {
|
||||
this._openModal({
|
||||
title: '插入音乐',
|
||||
|
||||
@@ -33,6 +33,7 @@ export default function createPreviewHtml(str) {
|
||||
str = str.replace(/{hide[^}]*}([\s\S]*?){\/hide}/g, '<joe-hide></joe-hide>');
|
||||
str = str.replace(/{card-default([^}]*)}([\s\S]*?){\/card-default}/g, '<section style="margin-bottom: 15px"><joe-card-default $1><span class="_temp" style="display: none">$2</span></joe-card-default></section>');
|
||||
str = str.replace(/{callout([^}]*)}([\s\S]*?){\/callout}/g, '<section style="margin-bottom: 15px"><joe-callout $1><span class="_temp" style="display: none">$2</span></joe-callout></section>');
|
||||
str = str.replace(/{card-describe([^}]*)}([\s\S]*?){\/card-describe}/g, '<section style="margin-bottom: 15px"><joe-card-describe $1><span class="_temp" style="display: none">$2</span></joe-card-describe></section>');
|
||||
str = str.replace(/{tabs}([\s\S]*?){\/tabs}/g, '<section style="margin-bottom: 15px"><joe-tabs><span class="_temp" style="display: none">$1</span></joe-tabs></section>');
|
||||
str = str.replace(/{card-list}([\s\S]*?){\/card-list}/g, '<section style="margin-bottom: 15px"><joe-card-list><span class="_temp" style="display: none">$1</span></joe-card-list></section>');
|
||||
str = str.replace(/{timeline}([\s\S]*?){\/timeline}/g, '<section style="margin-bottom: 15px"><joe-timeline><span class="_temp" style="display: none">$1</span></joe-timeline></section>');
|
||||
|
||||
@@ -205,6 +205,11 @@ export default [
|
||||
title: '复制文本',
|
||||
innerHTML: '<svg t="1619140348056" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3613" width="20" height="20"><path d="M731.682 676.057V183.323c0-30.233-24.512-54.746-54.748-54.746H184.216c-30.233 0-54.747 24.513-54.747 54.746v492.734c0 30.208 24.514 54.747 54.747 54.747h492.718c30.235 0 54.748-24.539 54.748-54.747z m-109.493 0H238.963c-30.234 0-54.747-24.538-54.747-54.745V238.07c0-30.233 24.513-54.747 54.747-54.747h383.226c30.234 0 54.745 24.513 54.745 54.747v383.243c0 30.206-24.512 54.744-54.745 54.744z m218.986-383.24h-54.746v54.747c30.232 0 54.746 24.513 54.746 54.76V785.55c0 30.207-24.514 54.746-54.746 54.746H403.202c-30.234 0-54.747-24.539-54.747-54.746h-54.747v54.746c0 30.208 24.513 54.748 54.747 54.748h492.72c30.234 0 54.747-24.54 54.747-54.748V347.564c0-30.235-24.514-54.747-54.747-54.747z" p-id="3614"></path></svg>'
|
||||
},
|
||||
{
|
||||
type: 'card-describe',
|
||||
title: '描述卡片',
|
||||
innerHTML: '<svg t="1619143998920" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21069" width="20" height="20"><path d="M202.666667 149.333333C150.016 149.333333 106.666667 192.682667 106.666667 245.333333v533.333334C106.666667 831.317333 150.016 874.666667 202.666667 874.666667h618.666666c52.650667 0 96-43.349333 96-96v-533.333334C917.333333 192.682667 873.984 149.333333 821.333333 149.333333h-448a32 32 0 0 0-5.504 0.426667c-2.816-0.213333-5.653333-0.426667-8.490666-0.426667H202.666667z m0 64h156.672c14.122667 0 27.690667 5.610667 37.696 15.616l102.997333 103.018667A32 32 0 0 0 522.666667 341.333333h298.666666c18.048 0 32 13.952 32 32v405.333334c0 18.048-13.952 32-32 32h-618.666666c-18.048 0-32-13.952-32-32v-533.333334c0-18.048 13.952-32 32-32z m269.248 0H821.333333c18.048 0 32 13.952 32 32v37.973334a94.016 94.016 0 0 0-32-5.973334H535.914667l-64-64z" p-id="21070"></path></svg>'
|
||||
},
|
||||
/* --------------------------- 短代码结束 --------------------------- */
|
||||
{
|
||||
type: 'clean',
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -324,6 +324,9 @@ class Joe extends JoeAction {
|
||||
case 'copy':
|
||||
super.handleCopy(this.cm);
|
||||
break;
|
||||
case 'card-describe':
|
||||
super.handleCardDescribe(this.cm);
|
||||
break;
|
||||
case 'preview':
|
||||
el.toggleClass('active');
|
||||
if (el.hasClass('active')) window.JoeConfig.canPreview = true;
|
||||
|
||||
Reference in New Issue
Block a user