Skip to content

Commit 3b7493c

Browse files
authored
Merge pull request #512 from devforth/update-markdown-plugin-documentation
docs: add documentation for markdown top panel
2 parents 6aeddde + c0c7d86 commit 3b7493c

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

adminforth/documentation/docs/tutorial/08-Plugins/14-markdown.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,39 @@ plugins: [
169169
},
170170
}),
171171
]
172-
```
172+
```
173+
174+
### Markdown Top Panel
175+
The Markdown plugin also provides a convenient top panel with formatting buttons, allowing users to quickly apply Markdown syntax without typing it manually.
176+
177+
By default, the toolbar includes common formatting actions such as:
178+
- Bold
179+
- Italic
180+
- Underline
181+
- Strikethrough
182+
- Headings (H1, H2, H3)
183+
- Lists (ordered and unordered)
184+
- Links
185+
- Code blocks
186+
187+
If some buttons are unnecessary for your use case, you can easily disable them using the topPanelSettings option.
188+
189+
```typescript title="./resources/apartments.ts"
190+
import MarkdownPlugin from '@adminforth/markdown';
191+
192+
// ... existing resource configuration ...
193+
194+
plugins: [
195+
new MarkdownPlugin({
196+
fieldName: "description",
197+
// diff-add
198+
topPanelSettings: {
199+
// diff-add
200+
bold: false, //disable bold button
201+
},
202+
})
203+
]
204+
```
205+
206+
>👆 Full list of buttons you can enable or disable via topPanelSettings:
207+
bold, italic, underline, strike, h1, h2, h3, ul, ol, link, codeBlock

0 commit comments

Comments
 (0)