From 16cd7e2c0db549c9f4bdb55aa217eee9ef7d91b4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 23 Dec 2025 10:03:43 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16672 --- .../assets/scss/component/_typography.scss | 2 ++ app/src/assets/scss/protyle/_wysiwyg.scss | 2 -- app/src/plugin/API.ts | 2 +- app/src/plugin/ProtyleMethod.ts | 34 +++++++++++++++++++ 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 app/src/plugin/ProtyleMethod.ts diff --git a/app/src/assets/scss/component/_typography.scss b/app/src/assets/scss/component/_typography.scss index 9e5c9938a..2fac097f4 100644 --- a/app/src/assets/scss/component/_typography.scss +++ b/app/src/assets/scss/component/_typography.scss @@ -222,6 +222,8 @@ text-align: center; height: 1.2em; line-height: 1.2em; + padding: 4px; + border-radius: var(--b3-border-radius); } &-img { diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss index 1f60de26b..d97beb724 100644 --- a/app/src/assets/scss/protyle/_wysiwyg.scss +++ b/app/src/assets/scss/protyle/_wysiwyg.scss @@ -785,8 +785,6 @@ .callout-icon { cursor: pointer; - padding: 4px; - border-radius: var(--b3-border-radius); transition: var(--b3-background-transition); &:hover { diff --git a/app/src/plugin/API.ts b/app/src/plugin/API.ts index 121ff0e4f..a2af87e01 100644 --- a/app/src/plugin/API.ts +++ b/app/src/plugin/API.ts @@ -16,7 +16,6 @@ import {Constants} from "../constants"; import {Setting} from "./Setting"; import {Menu} from "./Menu"; import {Protyle} from "../protyle"; -import ProtyleMethod from "../protyle/method"; import {openMobileFileById} from "../mobile/editor"; import {lockScreen, exitSiYuan} from "../dialog/processSystem"; import {Model} from "../layout/Model"; @@ -32,6 +31,7 @@ import {exportLayout} from "../layout/util"; import {saveScroll} from "../protyle/scroll/saveScroll"; import {hasClosestByClassName} from "../protyle/util/hasClosest"; import {Files} from "../layout/dock/Files"; +import {ProtyleMethod} from "./ProtyleMethod"; let openTab; let openWindow; diff --git a/app/src/plugin/ProtyleMethod.ts b/app/src/plugin/ProtyleMethod.ts new file mode 100644 index 000000000..f13b17b9a --- /dev/null +++ b/app/src/plugin/ProtyleMethod.ts @@ -0,0 +1,34 @@ +import { graphvizRender } from "../protyle/render/graphvizRender"; +import { highlightRender } from "../protyle/render/highlightRender"; +import { mathRender } from "../protyle/render/mathRender"; +import { mermaidRender } from "../protyle/render/mermaidRender"; +import { flowchartRender } from "../protyle/render/flowchartRender"; +import { chartRender } from "../protyle/render/chartRender"; +import { abcRender } from "../protyle/render/abcRender"; +import { htmlRender } from "../protyle/render/htmlRender"; +import { mindmapRender } from "../protyle/render/mindmapRender"; +import { plantumlRender } from "../protyle/render/plantumlRender"; +import { avRender } from "../protyle/render/av/render"; + +export class ProtyleMethod { + /** 对 graphviz 进行渲染 */ + public static graphvizRender = graphvizRender; + /** 为 element 中的代码块进行高亮渲染 */ + public static highlightRender = highlightRender; + /** 对数学公式进行渲染 */ + public static mathRender = mathRender; + /** 流程图/时序图/甘特图渲染 */ + public static mermaidRender = mermaidRender; + /** flowchart.js 渲染 */ + public static flowchartRender = flowchartRender; + /** 图表渲染 */ + public static chartRender = chartRender; + /** 五线谱渲染 */ + public static abcRender = abcRender; + /** 脑图渲染 */ + public static mindmapRender = mindmapRender; + /** UML 渲染 */ + public static plantumlRender = plantumlRender; + public static avRender = avRender; + public static htmlRender = htmlRender; +}