Skip to content

Commit 22a5927

Browse files
committed
docs(helper): about markdown in html tag, fixed #655 fixed #667
1 parent 5ab9d8c commit 22a5927

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

docs/helpers.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
8888
![logo](https://docsify.js.org/_media/icon.svg ':size=100')
8989

9090
<!-- Support percentage -->
91+
9192
![logo](https://docsify.js.org/_media/icon.svg ':size=10%')
9293
```
9394

@@ -99,4 +100,46 @@ You will get `<a href="/demo/">link</a>`html. Do not worry, you can still set ti
99100

100101
```md
101102
### 你好,世界! :id=hello-world
102-
```
103+
```
104+
105+
## Markdown in html tag
106+
107+
You need to insert a space between the html and markdown content.
108+
This is useful for rendering markdown content in the details element.
109+
110+
```markdown
111+
<details>
112+
<summary>Self-assessment (Click to expand)</summary>
113+
114+
- Abc
115+
- Abc
116+
117+
</details>
118+
```
119+
120+
<details>
121+
<summary>Self-assessment (Click to expand)</summary>
122+
123+
- Abc
124+
- Abc
125+
126+
</details>
127+
128+
Or markdown content can be wrapped in html tag.
129+
130+
```markdown
131+
<div style='color: red'>
132+
133+
- listitem
134+
- listitem
135+
- listitem
136+
137+
</div>
138+
```
139+
140+
<div style='color: red'>
141+
142+
- Abc
143+
- Abc
144+
145+
</div>

0 commit comments

Comments
 (0)