Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rojer95/katex-mini-api
katex-mini服务端实现方法
https://github.com/rojer95/katex-mini-api
Last synced: about 1 month ago
JSON representation
katex-mini服务端实现方法
- Host: GitHub
- URL: https://github.com/rojer95/katex-mini-api
- Owner: rojer95
- Created: 2022-03-13T06:39:41.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-12T07:42:34.000Z (over 2 years ago)
- Last Synced: 2024-11-05T21:42:43.419Z (3 months ago)
- Language: JavaScript
- Homepage: katex-mini-api.vercel.app
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# katex-weapp 在线 API
基于 KaTeX 构建的小程序原生 LaTeX 渲染组件(API 服务)
## 使用方法
### 第一步:导入 wxss
`katex-mini.wxss` 下载地址: https://cdn.jsdelivr.net/npm/@rojer/katex-mini/dist/index.wxss
```less
// 在app.wxss中
@import "katex-mini.wxss";
```### 第二步:请求接口
```javascript
wx.request({
url: "https://katex-mini-api.vercel.app",
data: {
latex: "a=b+c",
},
dataType: "json",
success(res) {
this.setData({
nodes: res.data,
});
},
});
```### 第三步:放到 RichText 组件里
```html
```