Skip to content

Commit

Permalink
fix: syntax type err & formula config
Browse files Browse the repository at this point in the history
  • Loading branch information
ufec committed Aug 21, 2023
1 parent 7098bba commit 76a5f2a
Show file tree
Hide file tree
Showing 11 changed files with 420 additions and 20 deletions.
53 changes: 53 additions & 0 deletions examples/formula.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Cherry Editor - Markdown Editor</title>
<style>
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}

video {
max-width: 400px;
}

#demo-val {
display: none;
}

img {
max-width: 100%;
}
iframe.cherry-dialog-iframe {
width: 100%;
height: 100%;
}
</style>
<link rel="stylesheet" type="text/css" href="../dist/cherry-markdown.css" />
<link rel="Shortcut Icon" href="./logo/favicon.ico" />
<link rel="Shortcut Icon" href="../logo/favicon.ico" />
<link rel="Bookmark" href="../logo/favicon.ico" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X"
crossorigin="anonymous"
/>
<link href="./markdown/basic.md" rel="preload" />
</head>

<body>
<div id="dom_mask" style="position: absolute; top: 40px; height: 20px; width: 100%"></div>
<div id="markdown"></div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/echarts.js"></script>
<!--<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>-->
<script src="../dist/cherry-markdown.js"></script>
<script src="./scripts/pinyin/pinyin_dist.js"></script>
<script src="./scripts/formula.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions examples/images/frac.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/images/minus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/images/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions examples/markdown/formula.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Formula

## 数学公式

### symbol

$+$
$-$

### fraction

$\frac{a}{b}$

## 物理公式

### symbol

$\vec{a}$

$\vec{v}$

### mechanics

$\vec{F}=m\vec{a}$

$W=\int_{C} \vec{F} \cdot \mathrm{d} \vec{s}$

Loading

0 comments on commit 76a5f2a

Please sign in to comment.