Skip to content

Commit f7b0a94

Browse files
committed
Merge branch 'next' of github.com:devforth/adminforth into next
2 parents dcee05f + 2dbe48f commit f7b0a94

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Markdown
2+
3+
The Markdown plugin enables Markdown support in AdminForth, allowing users to create and edit fields using Markdown syntax and save rich content in Markdown syntax.
4+
5+
Also, it allows previewing of Markdown fields in the show page.
6+
7+
## Installation
8+
9+
To install the plugin:
10+
11+
```bash
12+
npm install @adminforth/markdown --save
13+
```
14+
15+
### Usage
16+
17+
Instantiate the plugin in your apartments resource file for 'description' field.
18+
19+
```typescript title="./resources/apartments.ts"
20+
import MarkdownPlugin from '@adminforth/markdown';
21+
22+
// ... existing resource configuration ...
23+
24+
plugins: [
25+
new MarkdownPlugin({fieldName: "description"}),
26+
]
27+
```
28+
29+
> Please note that plugin can only work on TEXT and STRING fields
30+
31+
Here is how it looks in the create view:
32+
33+
![alt text](markdown.png)
34+
35+
Here is how it looks in show view:
36+
37+
![alt text](markdown-show1.png)
38+
![alt text](markdown-show2.png)
39+
52.1 KB
Loading
57.1 KB
Loading
102 KB
Loading

0 commit comments

Comments
 (0)