feat(markdown): render TikZ fenced blocks to SVG
Adds a markdown-it extractor for ```tikz blocks that emits a sanitized placeholder, plus a runTikz() that lazy-loads the obsidian-tikzjax 0.5.2 bundle from jsdelivr on first encounter, sanitizes the produced SVG with DOMPurify, and caches it in PouchDB keyed by sha256(source) so repeat views are instant and offline-capable.
This commit is contained in:
6
src/data/models/TikzCache.ts
Normal file
6
src/data/models/TikzCache.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { DataType } from "@/data/DataType.enum"
|
||||
import { Model } from "@/data/models/Model"
|
||||
|
||||
export interface TikzCache extends Model<DataType.TikzCache> {
|
||||
svg: string
|
||||
}
|
||||
Reference in New Issue
Block a user