forked from Vanessa219/vditor
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ddaad1
commit f2bbdb0
Showing
13 changed files
with
56 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export const mathRenderAdapter = { | ||
getCode: (mathElement: Element) => mathElement.textContent, | ||
getElements: (element: HTMLElement) => element.querySelectorAll(".language-math"), | ||
}; | ||
export const mermaidRenderAdapter = { | ||
/** 不仅要返回code,并且需要将 code 设置为 el 的 innerHTML */ | ||
getCode: (el: Element) => el.textContent, | ||
getElements: (element: HTMLElement) => element.querySelectorAll(".language-mermaid"), | ||
}; | ||
export const mindmapRenderAdapter = { | ||
getCode: (el: Element) => el.getAttribute("data-code"), | ||
getElements: (el: HTMLElement | Document) => el.querySelectorAll(".language-mindmap"), | ||
}; | ||
export const chartRenderAdapter = { | ||
getCode: (el: HTMLElement) => el.innerText, | ||
getElements: (el: HTMLElement | Document) => el.querySelectorAll(".language-echarts"), | ||
}; | ||
export const abcRenderAdapter = { | ||
getCode: (el: Element) => el.textContent, | ||
getElements: (el: HTMLElement | Document) => el.querySelectorAll(".language-abc"), | ||
}; | ||
export const graphvizRenderAdapter = { | ||
getCode: (el: Element) => el.textContent, | ||
getElements: (el: HTMLElement | Document) => el.querySelectorAll(".language-graphviz"), | ||
}; | ||
export const flowchartRenderAdapter = { | ||
getCode: (el: Element) => el.textContent, | ||
getElements: (el: HTMLElement | Document) => el.querySelectorAll(".language-flowchart"), | ||
}; | ||
export const plantumlRenderAdapter = { | ||
getCode: (el: Element) => el.textContent, | ||
getElements: (el: HTMLElement | Document) => el.querySelectorAll(".language-plantuml"), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters