哈哈哈哈 😺 哈哈哈哈 😺 哈哈哈哈 😺
呵呵
斜体
任务列表
- 列表一
列表二最大
- 我是列表三
- 列表四 🍰
待办事项
我觉得还可以吧
- 待办事项
- 苹果 🍎
- 橘子 🍊
- Banana 🍌
- 这个是啥
截图鸭


代码块
int i = 10;<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Settings.php
* Author : Hran
* Date : 2017/3/26
* Version :
* Description:
*/
class Mirages_Settings {
public function __get($key) {
return $this->get($key);
}
public function __set($key, $value) {
$this->set($key, $value);
}
}JS 代码呢
editorButtons.addButton("github", "短代码 - Github Repo", "github", {
title: "插入短代码 - Github Repo",
fields: [
{name: "repo", title: "Github Repo", required: true}
]
}, (formData) => {
if (!formData.repo) {
alert("Github Repo 不能为空");
return false;
}
let repo = formData.repo;
let matched = repo.match(/^(http|https):\/\/github.com\/([^\/]+\/[^\/]+)$/);
if (matched) {
repo = matched[2];
}
return `[github repo="${repo}" /]`;
});