From 08d9eec0f6b92da65ad2b284e68e3ea348bcf1b6 Mon Sep 17 00:00:00 2001 From: Tobias Date: Tue, 5 Nov 2024 11:31:57 +0100 Subject: [PATCH 1/2] Docs mdx: Add sections on custom `options` --- docs/src/content/pages/fields/mdx.mdoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/src/content/pages/fields/mdx.mdoc b/docs/src/content/pages/fields/mdx.mdoc index 4e0bfc85e..7711b97b5 100644 --- a/docs/src/content/pages/fields/mdx.mdoc +++ b/docs/src/content/pages/fields/mdx.mdoc @@ -125,6 +125,24 @@ someContent: | --- +## Formatting options + +The WYSIWYG toolbar can be customised to allow a range of formatting options. This is done via `options`. + +Please consult the type signature for `MDXEditorOptions` for a full set of customization options: +[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions) + +--- + +## Image options + +The WYSIWYG toolbar has a build in image option. Just like with [the Image field](/docs/fields/image#directory), you can customize the `directory` and `publicPath`. + +Please consult the type signature for `MDXEditorOptions.image` for a full set of customization options: +[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions) + +--- + ## Type signature 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) From 9bb22709c1289ef5154acd9a2e364e1b19ca0c0a Mon Sep 17 00:00:00 2001 From: Emma Hamilton Date: Wed, 6 Nov 2024 09:49:59 +1000 Subject: [PATCH 2/2] Updates --- docs/src/content/pages/fields/markdoc.mdoc | 18 ++++++++++++++++++ docs/src/content/pages/fields/mdx.mdoc | 8 ++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/src/content/pages/fields/markdoc.mdoc b/docs/src/content/pages/fields/markdoc.mdoc index 82d5cb7e1..9b901e512 100644 --- a/docs/src/content/pages/fields/markdoc.mdoc +++ b/docs/src/content/pages/fields/markdoc.mdoc @@ -76,6 +76,24 @@ someContent: | --- +## Formatting options + +The editor can be customised to allow a range of formatting options. This is done via `options`. + +See the type signature for `MarkdocEditorOptions` for the full set of options: +[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions) + +--- + +## Image options + +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. + +See the type signature for `MarkdocEditorOptions.image` for the full set of options: +[https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.markdoc.MarkdocEditorOptions) + +--- + ## Type signature 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) diff --git a/docs/src/content/pages/fields/mdx.mdoc b/docs/src/content/pages/fields/mdx.mdoc index 7711b97b5..520199378 100644 --- a/docs/src/content/pages/fields/mdx.mdoc +++ b/docs/src/content/pages/fields/mdx.mdoc @@ -127,18 +127,18 @@ someContent: | ## Formatting options -The WYSIWYG toolbar can be customised to allow a range of formatting options. This is done via `options`. +The editor can be customised to allow a range of formatting options. This is done via `options`. -Please consult the type signature for `MDXEditorOptions` for a full set of customization options: +See the type signature for `MDXEditorOptions` for the full set of options: [https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions) --- ## Image options -The WYSIWYG toolbar has a build in image option. Just like with [the Image field](/docs/fields/image#directory), you can customize the `directory` and `publicPath`. +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. -Please consult the type signature for `MDXEditorOptions.image` for a full set of customization options: +See the type signature for `MDXEditorOptions.image` for the full set of options: [https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.mdx.MDXEditorOptions) ---