Skip to content

Commit f107720

Browse files
committed
docs: add to markdown docs "compactShowPreview" and "maxShowViewContainerHeightPx" examples
https://web.tracklify.com/project/2b7ZVgE5/AdminForth/1401/j3wbyLxf/add-compactpreview-and-maxheig
1 parent 1f8eb49 commit f107720

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,32 @@ plugins: [
205205

206206
>👆 Full list of buttons you can enable or disable via topPanelSettings:
207207
bold, italic, underline, strike, h1, h2, h3, ul, ol, link, codeBlock
208+
209+
210+
## Change size of show view markdown text
211+
By default in markdown plugin turned cumpact preview mode, but you can turn it off:
212+
213+
214+
```ts
215+
new MarkdownPlugin({
216+
fieldName: 'description',
217+
//diff-add
218+
compactShowPreview: false,
219+
...
220+
})
221+
222+
```
223+
224+
## Limiting height of the markdown renderer on show view
225+
If you have really long markdown text and you don't wan't it to take the whole space on show view page, you can use `maxShowViewContainerHeightPx`, that will add max-height to the markdown renderer and button `show more`, so you can expand it.
226+
227+
```ts
228+
new MarkdownPlugin({
229+
fieldName: 'description',
230+
compactShowPreview: false,
231+
//diff-add
232+
maxShowViewContainerHeightPx: 400,
233+
...
234+
})
235+
236+
```

0 commit comments

Comments
 (0)