Import data json below to dynamic highlight config.
{
"light-time-8-5": {
"class": "light-time-8-5",
"color": "#E45858",
"regex": true,
"query": "(?<=\\s)(0?8|20):[3-5][0-9](:[0-5][0-9])?(?=(\\s|$))",
"mark": [| module.exports = async params => { | |
| // Get current active file view | |
| const activeView = params.app.workspace.getActiveFileView() | |
| if (!activeView) { | |
| new Notice('No active file view found!') | |
| return | |
| } | |
| // Toggle edit mode for all blocks |
| { | |
| "templates": [ | |
| { | |
| "name": "Vue3 + TypeScript", | |
| "path": "./templates/vue3-ts", | |
| "description": "Vue 3 项目模板,使用 TypeScript", | |
| "version": "1.0.0" | |
| }, | |
| { | |
| "name": "React + TypeScript", |
| package main | |
| import ( | |
| "bufio" | |
| "encoding/csv" | |
| "fmt" | |
| "io" | |
| "net/http" | |
| "os" | |
| "path/filepath" |
| // Interface defining the options for showing content | |
| interface ShowContentOptions { | |
| start: number; // Starting position of the content | |
| end: number; // Ending position of the content | |
| content: string; // The full content string | |
| view: MyView; // The view object | |
| file: TFile; // The file object | |
| plugin: MyPlugin; // The plugin instance | |
| } |
| /* attempt to better vertically align block embeds in lists */ | |
| :is(.HyperMD-list-line, .markdown-rendered :is(ol, ul)) .inline-embed[src*="#^"]:has(.markdown-preview-section > div > ul:only-child) { | |
| margin-left: 0px; | |
| border-left: 0px; | |
| padding-left: 0px; | |
| & > .embed-title { | |
| display: none; | |
| } |
| export default class ExamplePlugin extends Plugin { | |
| async onload() { | |
| this.registerExtensions(["epub"], "epub"); | |
| this.registerView("epub", (leaf) => new EpubView(leaf)); | |
| } | |
| onunload() { | |
| } | |
| } |
| "use client" | |
| import * as React from "react" | |
| import { buttonVariants } from "@/components/ui/button" | |
| import { ScrollArea } from "@/components/ui/scroll-area" | |
| import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" | |
| import { cn } from "@/lib/utils" | |
| import { ChevronLeft, ChevronRight } from "lucide-react" | |
| import { DayPicker, DropdownProps } from "react-day-picker" |
| module.exports = {"Copy Chat History": copyChatWithHistory, "Copy Last Answer": copyLastAnswer}; | |
| const ExportMD = (function () { | |
| if (!window.TurndownService) return; | |
| const hljsREG = /^.*(hljs).*(language-[a-z0-9]+).*$/i; | |
| const turndownService = new window.TurndownService({ | |
| headingStyle: "atx", | |
| hr: "---", | |
| bulletListMarker: "-", | |
| codeBlockStyle: "fenced", |
| // Version 0.0.1 | |
| module.exports = askChatWithPrompt; | |
| function askChat(str, app) { | |
| const prompt = encodeURI(str); | |
| const chatViewEl = app.workspace.getLeavesOfType("surfing-view").find((item)=>{ return /chat\.openai\.com/.test(item?.view?.currentUrl)}).view.webviewEl; | |
| chatViewEl.executeJavaScript(` | |
| var htmlElement = document.querySelector("textarea"); | |
| htmlElement.value = decodeURI("${ prompt }"); |
Import data json below to dynamic highlight config.
{
"light-time-8-5": {
"class": "light-time-8-5",
"color": "#E45858",
"regex": true,
"query": "(?<=\\s)(0?8|20):[3-5][0-9](:[0-5][0-9])?(?=(\\s|$))",
"mark": [