Skip to content

Commit 5576ded

Browse files
authored
Docs mdx/markdoc: Add sections on custom options (#1348)
1 parent 35575f5 commit 5576ded

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

docs/src/content/pages/fields/markdoc.mdoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,24 @@ someContent: |
7676

7777
---
7878

79+
## Formatting options
80+
81+
The editor can be customised to allow a range of formatting options. This is done via `options`.
82+
83+
See the type signature for `MarkdocEditorOptions` for the full set of options:
84+
[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions)
85+
86+
---
87+
88+
## Image options
89+
90+
The directory where images are stored can be customised in the same way as [`fields.image`](/docs/fields/image) with `directory` and `publicPath`. Though unlike [`fields.image`](/docs/fields/image) outside the editor where image filenames are determined by the key in the schema where the field is, filenames for images in the editor can be customised directly in the editor.
91+
92+
See the type signature for `MarkdocEditorOptions.image` for the full set of options:
93+
[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions)
94+
95+
---
96+
7997
## Type signature
8098

8199
Find the latest version of this field's type signature at: [https://docsmill.dev/npm/@keystatic/core#/.fields.markdoc](https://docsmill.dev/npm/@keystatic/core#/.fields.markdoc)

docs/src/content/pages/fields/mdx.mdoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,24 @@ someContent: |
125125

126126
---
127127

128+
## Formatting options
129+
130+
The editor can be customised to allow a range of formatting options. This is done via `options`.
131+
132+
See the type signature for `MDXEditorOptions` for the full set of options:
133+
[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions)
134+
135+
---
136+
137+
## Image options
138+
139+
The directory where images are stored can be customised in the same way as [`fields.image`](/docs/fields/image) with `directory` and `publicPath`. Though unlike [`fields.image`](/docs/fields/image) outside the editor where image filenames are determined by the key in the schema where the field is, filenames for images in the editor can be customised directly in the editor.
140+
141+
See the type signature for `MDXEditorOptions.image` for the full set of options:
142+
[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions)
143+
144+
---
145+
128146
## Type signature
129147

130148
Find the latest version of this field's type signature at: [https://docsmill.dev/npm/@keystatic/core#/.fields.mdx](https://docsmill.dev/npm/@keystatic/core#/.fields.mdx)

0 commit comments

Comments
 (0)