mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
This commit is contained in:
parent
4b873f2091
commit
0cac246415
16 changed files with 70 additions and 15 deletions
|
|
@ -34,6 +34,9 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
|
|||
addScript(`${cdn}/js/highlight.js/highlight.min.js?v=11.7.0`, "protyleHljsScript").then(() => {
|
||||
addScript(`${cdn}/js/highlight.js/third-languages.js?v=1.0.1`, "protyleHljsThirdScript").then(() => {
|
||||
codeElements.forEach((block: HTMLElement) => {
|
||||
const iconElements = block.parentElement.querySelectorAll(".protyle-icon");
|
||||
iconElements[0].setAttribute("aria-label", window.siyuan.languages.copy);
|
||||
iconElements[1].setAttribute("aria-label", window.siyuan.languages.more);
|
||||
if (block.getAttribute("data-render") === "true") {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue